public void Add(DataSeries ds)
 {
     dataSeriesList.Add (ds);
     if (ds.SeriesName == "") {
         ds.SeriesName = "DataSeries" + dataSeriesList.Count.ToString ();
     }
 }
 public void Insert(int dataSeriesIndex, DataSeries ds)
 {
     dataSeriesList.Insert (dataSeriesIndex, ds);
     if (ds.SeriesName == "") {
         dataSeriesIndex = dataSeriesIndex + 1;
         ds.SeriesName = "DataSeries" + dataSeriesIndex.ToString ();
     }
 }
        private void AddData()
        {
            dc.DataSeriesList.Clear();
            TextFileReader tfr = new TextFileReader();
            DataSeries ds = new DataSeries();

            // Add GE stock data from a text data file:
            ds = new DataSeries();
            var mainBundle = NSBundle.MainBundle;
            var filePath = mainBundle.PathForResource("GE","txt");
            ds.DataString = tfr.ReadTextFile(filePath);
            ds.LineStyle.LineColor = Color.DarkBlue;
            dc.Add(ds);
        }