ChartDirector 5.1 (.NET Edition)

XYChart.getNearestXValue


Usage

[VB] Public Function getNearestXValue(xCoor As Double) As Double
[C#] public double getNearestXValue(double xCoor);

Description

Gets the x data value that is nearest to the specified x pixel coordinate.

This method will search all x data values in the XYChart to look for the x data value that is nearest to the given x coordinate. If there are two x data values equally near to the specified x pixel coordinate, this method will arbitrarily return one of the values.

Arguments

ArgumentDefaultDescription
xCoor(Mandatory)The x pixel coordinate to search for.

Return Value

The x data value that is nearest to the specified x coordinate.