2

How can I modify an existing line/curve in a ZedGraphControl's GraphPane?

I use the following to get the data for that line:

CurveList lineData = zgcControl.GraphPane.CurveList[i];

But I am stumped on what to do with the CurveList after that. I want to modify the contents of the curvelist but I do not know how.

Any help with this? Thanks!

AstroCB
  • 12,337
  • 20
  • 57
  • 73
user488792
  • 1,943
  • 7
  • 31
  • 38

1 Answers1

3

What are you trying to modify?

Lets say you wanted to move the curve up by 100 units on the Y axis, it would look something like this:

    CurveList lineData = zedGraphControl1.GraphPane.CurveList;

    CurveItem curve = lineData[0];

    for (int i = 0; i < curve.Points.Count; i++ )
    {
        PointPair point = curve.Points[i];
        point.Y += 100;
    }
PeskyGnat
  • 2,454
  • 19
  • 22