ICoordinateCalculator
Using pre-computed constants, types which implement ICoordinateCalculator can convert from pixel coordinate to data value and back
Properties
public bool HasFlippedCoordinates { get; }
value = iCoordinateCalculator.HasFlippedCoordinates
Gets a value indicating whether coordinates are flipped
public bool IsCategoryAxisCalculator { get; }
value = iCoordinateCalculator.IsCategoryAxisCalculator
Gets a value indicating whether this is a category axis coordinate calculator
public bool IsHorizontalAxisCalculator { get; }
value = iCoordinateCalculator.IsHorizontalAxisCalculator
Gets a value indicating whether this is a horizontal axis coordinate calculator
public bool IsLogarithmicAxisCalculator { get; }
value = iCoordinateCalculator.IsLogarithmicAxisCalculator
Gets a value indicating whether this is a logarithmic axis coordinate calculator
public bool IsXAxisCalculator { get; }
value = iCoordinateCalculator.IsXAxisCalculator
Gets a value indicating whether this is coordinate calculator belongs by X axis
Methods
public double GetCoordinate(DateTime dataValue)
result = iCoordinateCalculator.GetCoordinate(dataValue)
Transforms the DateTime data value into a pixel coordinate
- dataValue
- The DateTime data value
Returns: The pixel coordinate
public double GetCoordinate(T dataValue)
result = iCoordinateCalculator.GetCoordinate(dataValue)
Transforms a data value into a pixel coordinate
- dataValue
- The data value
Returns: The pixel coordinate
public T GetDataValue(double pixelCoordinate)
result = iCoordinateCalculator.GetDataValue(pixelCoordinate)
Transforms a pixel coordinate into a data value
- pixelCoordinate
- The pixel coordinate
Returns: The data value
public DoubleRange TranslateBy(double pixels, DoubleRange inputRange)
result = iCoordinateCalculator.TranslateBy(pixels, inputRange)
Translates the min and max of the input range by the specified data value. Specific implementations of ICoordinateCalculator such as DoubleCoordinateCalculator, LogarithmicDoubleCoordinateCalculator and CategoryCoordinateCalculator will treat this differently
- pixels
- The number of pixels to translate by. InputRange min and max will be translated by this positive or negative amount
- inputRange
- The input DoubleRange to translate
Returns: A new instance of CategoryCoordinateCalculator with the translation applied
public DoubleRange TranslateBy(double minFraction, double maxFraction, IRange inputRange)
result = iCoordinateCalculator.TranslateBy(minFraction, maxFraction, inputRange)
Translates the min and max of the input range, multiplies them by the specified , . Specific implementations of ICoordinateCalculator such as DoubleCoordinateCalculator, LogarithmicDoubleCoordinateCalculator and CategoryCoordinateCalculator will treat this differently
- inputRange
- The input IRange to translate
- minFraction
- The multiplier of range start
- maxFraction
- The multiplier of range end