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 == string.Empty) {
         dataSeriesIndex = dataSeriesIndex + 1;
         ds.SeriesName = string.Format ("DataSeries{0}", dataSeriesIndex.ToString ());
     }
 }
 public void Add(DataSeries ds)
 {
     dataSeriesList.Add(ds);
     if (ds.SeriesName == string.Empty)
         ds.SeriesName = string.Format ("DataSeries{0}", dataSeriesList.Count.ToString ());
 }
        private void AddData(Graphics g)
        {
            cs.XLimMin = 0f;
            cs.XLimMax = 6f;
            cs.YLimMin = -1.5f;
            cs.YLimMax = 1.5f;
            cs.XTick = 1.0f;
            cs.YTick = 0.5f;
            cs.XLabel = "This is X axis";
            cs.YLabel = "This is Y axis";
            cs.Title = "Sine and Cosine Chart";

            dc.DataSeriesList.Clear();

            // Add Sine data with 7 data point:
            DataSeries ds1 = new DataSeries();
            ds1.LineStyle.LineColor = Color.Red;
            ds1.LineStyle.Thickness = 2f;
            ds1.LineStyle.Pattern = DashStyle.Dash;
            ds1.LineStyle.PlotMethod = LineStyle.PlotLinesMethodEnum.Lines;
            ds1.SeriesName = "Sine";
            ds1.SymbolStyle.SymbolType = SymbolStyle.SymbolTypeEnum.Diamond;
            ds1.SymbolStyle.BorderColor = Color.Red;
            ds1.SymbolStyle.FillColor = Color.Yellow;
            ds1.SymbolStyle.BorderThickness = 1f;
            for (int i = 0; i < 7; i++)
            {
                ds1.AddPoint(new PointF(1.0f * i, (float)Math.Sin(1.0f * i)));
            }
            dc.Add(ds1);

            // Add Cosine data with 7 data point:
            DataSeries ds2 = new DataSeries();
            ds2.LineStyle.LineColor = Color.Blue;
            ds2.LineStyle.Thickness = 1f;
            ds2.LineStyle.Pattern = DashStyle.Solid;
            ds2.LineStyle.PlotMethod = LineStyle.PlotLinesMethodEnum.Splines;
            ds2.SeriesName = "Cosine";
            ds2.SymbolStyle.SymbolType = SymbolStyle.SymbolTypeEnum.Triangle;
            ds2.SymbolStyle.BorderColor = Color.Blue;
            for (int i = 0; i < 40; i++)
            {
                ds2.AddPoint(new PointF(1.0f * i, (float)Math.Cos(1.0f * i)));
            }
            dc.Add(ds2);
        }
 public void Insert(int dataSeriesIndex, DataSeries ds)
 {
     dataSeriesList.Insert(dataSeriesIndex, ds);
     if (ds.SeriesName == "")
     {
         dataSeriesIndex = dataSeriesIndex + 1;
         ds.SeriesName = "DataSeries" + dataSeriesIndex.ToString();
     }
 }