ZedGraph labels

Posted by eKek0 on Stack Overflow See other posts from Stack Overflow or by eKek0
Published on 2009-05-03T03:28:35Z Indexed on 2010/06/09 8:42 UTC
Read the original article Hit count: 361

Filed under:
|
|

In ZedGraph how to show text labels for each point and in the XAxis all together?

EDIT:

If I do

myPane.XAxis.Type = AxisType.Text;
myPane.XAxis.Scale.TextLabels = array_of_string;

I get labels on the XAxis like this

alt text

And if I do

for (int i = 0; i < myCurve.Points.Count; i++)
{
    PointPair pt = myCurve.Points[i];
    // Create a text label from the Y data value
    TextObj text = new TextObj(pt.Y.ToString("f0"), pt.X, pt.Y + 0.1,
        CoordType.AxisXYScale, AlignH.Left, AlignV.Center);
    text.ZOrder = ZOrder.A_InFront;
    text.FontSpec.Angle = 0;
    myPane.GraphObjList.Add(text);
}

I get labels on the curve, like this

alt text

But if I do both at the same time, labels on the curve disappear.

Is there a way to combine both kind of labels?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about controls