user488792
user488792

Reputation: 2013

How to Modify ZedGraphControl GraphPane Line?

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!

Upvotes: 2

Views: 483

Answers (1)

PeskyGnat
PeskyGnat

Reputation: 2464

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;
    }

Upvotes: 3

Related Questions