AddPoint() public method

public AddPoint ( CGPoint pt ) : void
pt CGPoint
return void
Example #1
0
        void AddData(Graphics g)
        {
            float x, y;

            // Add first data series:
            dc.DataSeriesList.Clear();
            ds = new DataSeries();
            ds.BarStyle.BorderColor = Color.Red;
            ds.BarStyle.FillColor   = Color.Green;
            for (int i = 0; i < 5; i++)
            {
                x = i + 1;
                y = 2f * x;

                ds.AddPoint(new CGPoint(x, y));
            }

            dc.Add(ds);

            // Add second data series:
            ds = new DataSeries();
            ds.BarStyle.BorderColor = Color.Red;
            ds.BarStyle.FillColor   = Color.Yellow;
            for (int i = 0; i < 5; i++)
            {
                x = i + 1;
                y = 1.5f * x;
                ds.AddPoint(new CGPoint(x, y));
            }
            dc.Add(ds);

            // Add third data series:
            ds = new DataSeries();
            ds.BarStyle.BorderColor = Color.Red;
            ds.BarStyle.FillColor   = Color.Blue;
            for (int i = 0; i < 5; i++)
            {
                x = i + 1;
                y = 1f * x;
                ds.AddPoint(new CGPoint(x, y));
            }
            dc.Add(ds);
        }
        void AddData(Graphics g)
        {
            float x, y;
            // Add first data series:
            dc.DataSeriesList.Clear();
            ds = new DataSeries();
            ds.BarStyle.BorderColor = Color.Red;
            ds.BarStyle.FillColor = Color.Green;
            for (int i = 0; i < 5; i++) {
                x = i + 1;
                y = 2f * x;

                ds.AddPoint (new CGPoint (x, y));
            }

            dc.Add (ds);

            // Add second data series:
            ds = new DataSeries ();
            ds.BarStyle.BorderColor = Color.Red;
            ds.BarStyle.FillColor = Color.Yellow;
            for (int i = 0; i < 5; i++) {
                x = i + 1;
                y = 1.5f * x;
                ds.AddPoint (new CGPoint (x, y));
            }
            dc.Add (ds);

            // Add third data series:
            ds = new DataSeries ();
            ds.BarStyle.BorderColor = Color.Red;
            ds.BarStyle.FillColor = Color.Blue;
            for (int i = 0; i < 5; i++) {
                x = i + 1;
                y = 1f * x;
                ds.AddPoint (new CGPoint(x, y));
            }
            dc.Add (ds);
        }