public void AddGraphPoints(List <Series> ListofSeriestoBeReturned, AffectDataPoint currentPointOfInformation, Emotions currentEmotion)
        {
            DataPoint NewPoint;

            NewPoint = new DataPoint(currentPointOfInformation.getTimeStamp(), currentEmotion.Anger);
            ListofSeriestoBeReturned[(int)typesOfDataPointsEnum.Anger].Points.Add(NewPoint);
            NewPoint = new DataPoint(currentPointOfInformation.getTimeStamp(), currentEmotion.Contempt);
            ListofSeriestoBeReturned[(int)typesOfDataPointsEnum.Contempt].Points.Add(NewPoint);
            NewPoint = new DataPoint(currentPointOfInformation.getTimeStamp(), currentEmotion.Disgust);
            ListofSeriestoBeReturned[(int)typesOfDataPointsEnum.Disgust].Points.Add(NewPoint);
            NewPoint = new DataPoint(currentPointOfInformation.getTimeStamp(), currentEmotion.Engagement);
            ListofSeriestoBeReturned[(int)typesOfDataPointsEnum.Engagment].Points.Add(NewPoint);
            NewPoint = new DataPoint(currentPointOfInformation.getTimeStamp(), currentEmotion.Fear);
            ListofSeriestoBeReturned[(int)typesOfDataPointsEnum.Fear].Points.Add(NewPoint);
            NewPoint = new DataPoint(currentPointOfInformation.getTimeStamp(), currentEmotion.Joy);
            ListofSeriestoBeReturned[(int)typesOfDataPointsEnum.Joy].Points.Add(NewPoint);
            NewPoint = new DataPoint(currentPointOfInformation.getTimeStamp(), currentEmotion.Sadness);
            ListofSeriestoBeReturned[(int)typesOfDataPointsEnum.Sadness].Points.Add(NewPoint);
            NewPoint = new DataPoint(currentPointOfInformation.getTimeStamp(), currentEmotion.Surprise);
            ListofSeriestoBeReturned[(int)typesOfDataPointsEnum.Surprise].Points.Add(NewPoint);
            NewPoint = new DataPoint(currentPointOfInformation.getTimeStamp(), currentEmotion.Valence);
            ListofSeriestoBeReturned[(int)typesOfDataPointsEnum.Valence].Points.Add(NewPoint);
        }
        /// <summary>
        /// Turn Affectiva data to a list of series so it can pass to a graph
        /// </summary>
        /// <returns></returns>
        public List <Series> GetChartSeriesOfData()
        {
            // mrecordedAffDataList =  SortSeries( mrecordedAffDataList);
            List <Series> ListofSeriestoBeReturned = new List <Series>();

            for (int count = 0; count <= (int)typesOfDataPointsEnum.Valence; count++)
            {
                ListofSeriestoBeReturned.Add(new Series(typesOfDataPointsStrings[count]));
            }

            while (mrecordedAffDataList.Count > 0)
            {
                AffectDataPoint currentPointOfInformation = mrecordedAffDataList.Last();

                // b[point.GetTypeOfPoint()].Points.Add(NewPoint);
                Emotions currentEmotion = currentPointOfInformation.getEmotion();
                float    timeStamp      = currentPointOfInformation.getTimeStamp();



                switch (currentPointOfInformation.GetTypeOfPoint())
                {
                case (int)typesOfDataPointsEnum.AutoTag:
                {
                    AddGraphPoints(ListofSeriestoBeReturned, currentPointOfInformation, currentEmotion);

                    int   HighestEmotion = 0;
                    float ValueOfEmotion = 0;
                    getHighestEmotionFromFace(currentPointOfInformation.getEmotion(), ref HighestEmotion, ref ValueOfEmotion);

                    ListofSeriestoBeReturned[HighestEmotion].Points.Last().ToolTip     = currentPointOfInformation.getDescription();
                    ListofSeriestoBeReturned[HighestEmotion].Points.Last().Label       = "AutoTag";
                    ListofSeriestoBeReturned[HighestEmotion].Points.Last().Color       = System.Drawing.Color.Black;
                    ListofSeriestoBeReturned[HighestEmotion].Points.Last().MarkerStyle = MarkerStyle.Cross;
                    ListofSeriestoBeReturned[HighestEmotion].Points.Last().MarkerSize  = 30;



                    break;
                }

                case (int)typesOfDataPointsEnum.GraphPoint:
                {
                    AddGraphPoints(ListofSeriestoBeReturned, currentPointOfInformation, currentEmotion);
                    break;
                }

                case (int)typesOfDataPointsEnum.AutoEventBar:
                {
                    break;
                }

                case (int)typesOfDataPointsEnum.ManuelEventBar:
                {
                    break;
                }

                default:
                {
                    AddGraphPoints(ListofSeriestoBeReturned, currentPointOfInformation, currentEmotion);
                    int type = currentPointOfInformation.GetTypeOfPoint();
                    ListofSeriestoBeReturned[type].Points.Last().ToolTip     = currentPointOfInformation.getDescription();
                    ListofSeriestoBeReturned[type].Points.Last().Label       = currentPointOfInformation.getName();
                    ListofSeriestoBeReturned[type].Points.Last().Color       = System.Drawing.Color.Blue;
                    ListofSeriestoBeReturned[type].Points.Last().MarkerStyle = MarkerStyle.Diamond;
                    ListofSeriestoBeReturned[type].Points.Last().MarkerSize  = 30;


                    break;
                }
                }
                mrecordedAffDataList.Remove(mrecordedAffDataList.Last());
            }
            for (int count = 0; count < ListofSeriestoBeReturned.Count; count++)
            {
                ListofSeriestoBeReturned[count].Sort(PointSortOrder.Ascending, "X"); //     b[0].Points.Add(c);
            }
            return(ListofSeriestoBeReturned);
        }