iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x

ISCIIndexCalculator

@protocol ISCIIndexCalculator <NSObject>

Defines protocol which allows to transform values to indices and vice versa.

  • Gets index of specified value in sequence defined by this ISCIIndexDataProvider instance.

    Declaration

    Objective-C

    - (double)getIndexFrom:(double)value;

    Swift

    func getIndexFrom(_ value: Double) -> Double

    Parameters

    value

    The value to get index for.

    Return Value

    The index of specified value.

  • Gets value for specified index in sequence defined by this ISCIIndexDataProvider instance.

    Declaration

    Objective-C

    - (double)getValueFrom:(double)index;

    Swift

    func getValueFrom(_ index: Double) -> Double

    Parameters

    index

    The index to get value for

    Return Value

    The value at specified index

  • Gets indices of specified values in sequence defined by this ISCIIndexDataProvider instance.

    Declaration

    Objective-C

    - (void)getIndices:(nonnull float *)indices
        fromDataValues:(nonnull double *)dataValues
                 count:(NSInteger)count;

    Swift

    func getIndices(_ indices: UnsafeMutablePointer<Float>, fromDataValues dataValues: UnsafeMutablePointer<Double>, count: Int)

    Parameters

    dataValues

    The values to get indices for.

    indices

    The target indices array.

    count

    Amount of points to transform.

  • Gets values for specified indices in sequence defined by this ISCIIndexDataProvider instance.

    Declaration

    Objective-C

    - (void)getValues:(nonnull double *)dataValues
          fromIndices:(nonnull double *)indices
                count:(NSInteger)count;

    Swift

    func getValues(_ dataValues: UnsafeMutablePointer<Double>, fromIndices indices: UnsafeMutablePointer<Double>, count: Int)

    Parameters

    indices

    The indices to get values for.

    dataValues

    The target values array.

    count

    Amount of points to transform.