
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;
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;
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;
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;
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;
-
Gets the axis max value of visible range.
Declaration
Objective-C
@property (nonatomic, readonly) double maxAsDouble;
-
Gets the axis viewport size.
Note
Provided size is in user space coordinates.Declaration
Objective-C
@property (nonatomic, readonly) CGFloat viewportDimension;
-
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;
-
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;
-
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;
-
Gets a value indicating whether this coordinate calculator belongs by
X-Axis
.Note
YES - if this coordinate calculator belongs byX-Axis
.Declaration
Objective-C
@property (nonatomic, readonly) BOOL isXAxisCalculator;
-
Gets a value indicating whether coordinates are flipped.
Note
YES - if coordinate are flipped.Declaration
Objective-C
@property (nonatomic, readonly) BOOL hasFlippedCoordinates;
-
Gets a coordinate offset in pixels.
Declaration
Objective-C
@property (nonatomic, readonly) CGFloat coordinatesOffset;
-
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;
Parameters
range
The range to translate.
pixels
The number of pixels to translate by.