Click here to Skip to main content
15,886,720 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This may be simple, but I'm unable to figure it out. I have a linear graph in zed graph. Now I want to add a straight horizontal line for a threshold Y value in, say, Red so that it shows in the graph along with the actual data. I already know the threshold value for each of my counters.

C#
double threshHoldY = 2;
LineObj threshHoldLine = new LineObj(
    Color.Red,
    graphPane.XAxis.Scale.Min,
    threshHoldY,
    graphPane.XAxis.Scale.Max,
    threshHoldY);
graphPane.GraphObjList.Add(threshHoldLine);


this is the code i am trying but only draws the line in the beginning of the x- axis, where as i want it for the entire x-axixs.
Posted
Comments
lukeer 21-Mar-14 2:35am    
Just a shot in the dark: Can you alter the z-order of objects in GraphObjList? Then move the line further up.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900