Page 1 of 1

Using Subchart to calculate screen coordinates

Posted: Mon May 21, 2012 11:58 am
by 15660116
I need to calculate the screen coordinates of a point in a sub chart. The subchart displays correctly but the screen coordinate calclulation always returns zero.

Dim chart = SubChartTool1.Charts.AddChart("Chart0")
chart.Series.Add(New Steema.TeeChart.Styles.Points())
Dim Temp1 as Single
X1 = some real coordinate value (97)
Temp1 = chart.Chart(0).CalcXPosValue(X1)

Re: Using Subchart to calculate screen coordinates

Posted: Mon May 21, 2012 12:20 pm
by 15660116
I needed to update the chart by calling TChart1.Draw before the calculation. Problem solved.