ChartDirector 6.2 (.NET Edition)



[C#] public double getYValue(int yCoor [, Axis yAxis ]);
[VB] Public Function getYValue(yCoor As Integer [, yAxis As Axis ]) As Double


Gets the y data value given the y pixel coordinate.

This method always returns a numeric value. If the axis scale is a date/time scale, and you are expecting a DateTime data type, please use Chart.NTime to convert the number to the DateTime data type.

Note: This method should be used only after ChartDirector has output the chart image, or after XYChart.layoutAxes, BaseChart.layout or XYChart.packPlotArea has been called. ChartDirector needs to perform auto- scaling and layout the axis before it can convert between pixel coordinates and data values.


yCoor(Mandatory)The y pixel coordinate.
yAxis[Null]The y-axis to use to determine the pixel coordinates of data values. The y-axis may be obtained using XYChart.yAxis, XYChart.yAxis2 or XYChart.addAxis. The default is to use the primary y-axis.

Return Value

The y data value at the y pixel coordinate.