Gets the data point index at the specified x data value.
The index can be used in
DataSet.getValue and
DataSet.getPosition to obtain the y values and positions of the data points for all data sets in the layer.
The
tolerance argument is to allow this method to consider data points that are not exactly at
xValue, but are within
tolerance from it.
If multiple data points at within tolerance, this method will return the index of the data point nearest to
xValue. If multiple data points are equally near to
xValue, this method will choose one arbitrarily and return its data point index. If no data points are found, this method will return -1.
The data point index of the data point nearest to the specified x data value up to the specified tolerance, or -1 if no data points are found.
© 2023 Advanced Software Engineering Limited. All rights reserved.