ICategoryCoordinateCalculator

StockSharp.Xaml.Charting.Numerics.CoordinateCalculators

Defines the interface to a CategoryDateTimeAxis specific ICoordinateCalculator, to convert from pixel coordinate to index to data value and back

Implements: ICoordinateCalculator<double>

Methods

TransformDataToIndex
public int TransformDataToIndex(DateTime dataValue)
result = iCategoryCoordinateCalculator.TransformDataToIndex(dataValue)

Takes a DateTime data-value and transforms to integer index on the axis e.g. if the axis is a CategoryDateTimeAxis, accepts DateTime, returns index. If the DateTime lies outside of the data-range, a projection is performed

dataValue
The data value

Returns: The index to the underlying data series

TransformDataToIndex
public int TransformDataToIndex(DateTime dataValue, SearchMode searchMode)
result = iCategoryCoordinateCalculator.TransformDataToIndex(dataValue, searchMode)

Takes a DateTime data-value and transforms to integer index on the axis e.g. if the axis is a CategoryDateTimeAxis, accepts DateTime, returns index. If the DateTime lies outside of the data-range, a projection is performed

dataValue
The data value
searchMode
Indicates a way in wich to look for the

Returns: The index to the underlying data series or -1 if Exact and the doesn't exist.

TransformIndexToData
public DateTime TransformIndexToData(int index)
result = iCategoryCoordinateCalculator.TransformIndexToData(index)

Takes an integer index (or point number) to the underlying data and transforms to the data value on the axis. e.g. if the axis is a CategoryDateTimeAxis, accepts index, returns DateTime. If the index lies outside of the data-range, a projection is performed

index
The index to the underlying data series

Returns: The data value