ChartDirector 5.1 (.NET Edition)

XYChart.getXValue


Usage

[VB] Public Function getXValue(xCoor As Integer) As Double
[C#] public double getXValue(int xCoor);

Description

Gets the x data value given the x 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.

Arguments

ArgumentDefaultDescription
xCoor(Mandatory)The x pixel coordinate.

Return Value

The x data value at the x pixel coordinate.