AddPoint() публичный Метод

public AddPoint ( PointF pt ) : void
pt System.Drawing.PointF
Результат void
Пример #1
0
        public void AddData()
        {
            dc.DataSeriesList.Clear();
            // Add Sine data with 20 data point:
            DataSeries ds1 = new DataSeries();

            ds1.LineStyle.LineColor = Color.Red;
            ds1.LineStyle.Thickness = 2f;
            ds1.LineStyle.Pattern   = DashStyle.Dash;
            for (int i = 0; i < 20; i++)
            {
                ds1.AddPoint(new PointF(i / 5.0f, (float)Math.Sin(i / 5.0f)));
            }
            dc.Add(ds1);

            // Add Cosine data with 40 data point:
            DataSeries ds2 = new DataSeries();

            ds2.LineStyle.LineColor = Color.Blue;
            ds2.LineStyle.Thickness = 1f;
            ds2.LineStyle.Pattern   = DashStyle.Solid;
            for (int i = 0; i < 40; i++)
            {
                ds2.AddPoint(new PointF(i / 5.0f, (float)Math.Cos(i / 5.0f)));
            }
            dc.Add(ds2);
        }
        public void AddData()
        {
            dc.DataSeriesList.Clear();
            // Add Sine data with 20 data point:
            DataSeries ds1 = new DataSeries();
            ds1.LineStyle.LineColor = Color.Red;
            ds1.LineStyle.Thickness = 2f;
            ds1.LineStyle.Pattern = DashStyle.Dash;
            for (int i = 0; i < 20; i++)
            {
                ds1.AddPoint(new PointF(i / 5.0f, (float)Math.Sin(i / 5.0f)));
            }
            dc.Add(ds1);

            // Add Cosine data with 40 data point:
            DataSeries ds2 = new DataSeries();
            ds2.LineStyle.LineColor = Color.Blue;
            ds2.LineStyle.Thickness = 1f;
            ds2.LineStyle.Pattern = DashStyle.Solid;
            for (int i = 0; i < 40; i++)
            {
                ds2.AddPoint(new PointF(i / 5.0f, (float)Math.Cos(i / 5.0f)));
            }
            dc.Add(ds2);
        }