iOS Charting Documentation - SciChart iOS Charts SDK v3.x

ISCICoordinateCalculator

@protocol ISCICoordinateCalculator <NSObject>

Using pre-computed constants, types which implement ISCICoordinateCalculator can convert from pixel coordinate to data value and back.

  • Transforms a data value into a pixel coordinate.

    Declaration

    Objective-C

    - (float)getCoordinateFrom:(double)dataValue;

    Swift

    func getCoordinate(_ dataValue: Double) -> Float

    Parameters

    dataValue

    The data value to transform.

    Return Value

    The pixel coordinate.

  • Transforms a pixel coordinate into a data value.

    Declaration

    Objective-C

    - (double)getDataValueFrom:(float)coordinate;

    Swift

    func getDataValue(_ coordinate: Float) -> Double

    Parameters

    coordinate

    The pixel coordinate to transform.

    Return Value

    The data value.

  • Transforms data values into a pixel coordinates.

    Declaration

    Objective-C

    - (void)getCoordinates:(float *)coordinates
            fromDataValues:(double *)dataValues
                     count:(NSInteger)count;

    Swift

    func getCoordinates(_ coordinates: UnsafeMutablePointer<Float>!, fromDataValues dataValues: UnsafeMutablePointer<Double>!, count: Int)

    Parameters

    coordinates

    The target array for pixel coordinates.

    dataValues

    The data value to transform.

    count

    Amount of points to transform.

  • Transforms pixel coordinates into a data values.

    Declaration

    Objective-C

    - (void)getDataValues:(double *)dataValues
          fromCoordinates:(float *)coordinates
                    count:(NSInteger)count;

    Swift

    func getDataValues(_ dataValues: UnsafeMutablePointer<Double>!, fromCoordinates coordinates: UnsafeMutablePointer<Float>!, count: Int)

    Parameters

    dataValues

    The target array for data values.

    coordinates

    pixel coordinates to transform.

    count

    Amount of points to transform.

  • Gets the axis min value of visible range.

    Declaration

    Objective-C

    @property (readonly, nonatomic) double minAsDouble;

    Swift

    var minAsDouble: Double { get }
  • Gets the axis max value of visible range.

    Declaration

    Objective-C

    @property (readonly, nonatomic) double maxAsDouble;

    Swift

    var maxAsDouble: Double { get }
  • Gets the axis viewport size.

    Note

    Provided size is in user space coordinates.

    Declaration

    Objective-C

    @property (readonly, nonatomic) int viewportDimension;

    Swift

    var viewportDimension: Int32 { get }
  • Gets a value indicating whether this is a category axis coordinate calculator.

    Note

    YES - if this is a category axis coordinate calculator.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isCategoryAxisCalculator;

    Swift

    var isCategoryAxisCalculator: Bool { get }
  • Gets a value indicating whether this is a logarithmic axis coordinate calculator.

    Note

    YES - if this is a logarithmic axis coordinate calculator.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isLogarithmicAxisCalculator;

    Swift

    var isLogarithmicAxisCalculator: Bool { get }
  • Gets a value indicating whether this is a horizontal axis coordinate calculator.

    Note

    YES - if this is a horizontal axis coordinate calculator.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isHorizontalAxisCalculator;

    Swift

    var isHorizontalAxisCalculator: Bool { get }
  • Gets a value indicating whether this coordinate calculator belongs by X-Axis.

    Note

    YES - if this coordinate calculator belongs by X-Axis.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isXAxisCalculator;

    Swift

    var isXAxisCalculator: Bool { get }
  • Gets a value indicating whether coordinates are flipped.

    Note

    YES - if coordinate are flipped.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL hasFlippedCoordinates;

    Swift

    var hasFlippedCoordinates: Bool { get }
  • Gets a coordinate offset in pixels.

    Declaration

    Objective-C

    @property (readonly, nonatomic) double coordinatesOffset;

    Swift

    var coordinatesOffset: Double { get }
  • Translates the min and max of the input range by the specified data value.

    Declaration

    Objective-C

    - (void)translateRange:(id<ISCIRange>)range byPixels:(double)pixels;

    Swift

    func translate(_ range: ISCIRange!, byPixels pixels: Double)

    Parameters

    range

    The range to translate.

    pixels

    The number of pixels to translate by.