Archive

Posts Tagged ‘bar’

Vertical Bar in ZedGraphControl (repost)

June 23rd, 2009 Guilherme Morais 2 comments
During the last week I spend almost 4 hours trying to discovery how to put a vertical bar in a ZedGraphControl… the Wiki is very poor of explanations about this thinks… thank GOOD,I had found the solution in the CodeProject ( as always! ) I will re-post this one in here again just for facilitate in future research in the net:

To draw a vertical line in a chart ( ZegGraphControl ) like this two blue lines in the image (at right ) you need to do something like this:

Barra Vertigal in zedgraph

Barra Vertigal in zedgraph



 C# |  copy code |? 
1
    LineObj myLine = new LineObj( Color.Black, 2.3, 0, 2.3, 1 );
2
    myLine.Location.CoordinateFrame = CoordType.XScaleYChartFraction;
3
    myLine.Line.Width = 2.0f;
4
    myPane.GraphObjList.Add( myLine );

thanks to JChampion , to see the original post go to : Re: Add Vertical Lines to mark tolerances?