I have 2 label in my GraphPane that they positioned in the start of 2 graphs. Sometimes they have equal position and one of them is under another one. I want to change the "Y" value of one of them so both of them can be shown. my problem is that my curves Y range is so different. sometime "0 to 5" and some times "0 to 1000", so i can't use a static value. I decided to calculate a normal value with maximum amount of Y in the Pane but it returns 0.0!
below is my curves and code.
double label1Y = myCurve.Points[0].Y;
txtObj = new TextObj("Label1", myCurve.Points[0].X - 0.6, label1Y);
myPane.GraphObjList.Add(txtObj);
double label2Y = myCurve2.Points[0].Y;
if (label1Y == label2Y)
label2Y = label2Y + 2; //label2Y + (double)(myPane.YAxis.Scale.Max/10);
txtObj = new TextObj("Label2", myCurve2.Points[0].X - 0.6, label2Y);
myPane.GraphObjList.Add(txtObj);
Answer:
I finally used my curve maximum Y amount instead of axis Maximum Y amount.