iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.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:(nonnull float *)coordinates
            fromDataValues:(nonnull 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:(nonnull double *)dataValues
          fromCoordinates:(nonnull 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 (nonatomic, readonly) double minAsDouble;

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic, readonly) double maxAsDouble;

    Swift

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

    Note

    Provided size is in user space coordinates.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat viewportDimension;

    Swift

    var viewportDimension: CGFloat { 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 (nonatomic, readonly) 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 (nonatomic, readonly) 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 (nonatomic, readonly) 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 (nonatomic, readonly) 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 (nonatomic, readonly) BOOL hasFlippedCoordinates;

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat coordinatesOffset;

    Swift

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

    Declaration

    Objective-C

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

    Swift

    func translate(_ range: ISCIRange, byPixels pixels: CGFloat)

    Parameters

    range

    The range to translate.

    pixels

    The number of pixels to translate by.