iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
ISCIAxisCore
@protocol ISCIAxisCore <ISCIServiceProvider, ISCISuspendable,
ISCIInvalidatableElement, ISCIThemeable, ISCIAttachable>
Defines the base protocol for all axes types used throughout the SciChart SDK.
-
Gets or sets the string Id of this axis. Used to associated
ISCIRenderableSeries
.Declaration
Objective-C
@property (nonatomic, copy) NSString *_Nonnull axisId;
Swift
var axisId: String { get set }
-
Gets or ses the VisibleRangeLimitMode of the Axis.
Note
This property defines which parts ofvisibleRangeLimit
will be used by axis.Declaration
Objective-C
@property (nonatomic) SCIRangeClipMode visibleRangeLimitMode;
Swift
var visibleRangeLimitMode: SCIRangeClipMode { get set }
-
Gets or sets the minimal zoom constrain of the axis.
Note
Used to set the minimum distance between Min and Max of the VisibleRange.Declaration
Objective-C
@property (nonatomic, strong, nullable) id<ISCIComparable> minimalZoomConstrain;
Swift
var minimalZoomConstrain: ISCIComparable? { get set }
-
Gets or sets the maximum zoom constrain of the axis.
Note
Used to set the maximum distance between Min and Max of the VisibleRange.Declaration
Objective-C
@property (nonatomic, strong, nullable) id<ISCIComparable> maximumZoomConstrain;
Swift
var maximumZoomConstrain: ISCIComparable? { get set }
-
Gets or sets the minor delta value.
Note
Used for axis minor ticks spacing.Declaration
Objective-C
@property (nonatomic, strong) id<ISCIComparable> _Nonnull minorDelta;
Swift
var minorDelta: ISCIComparable { get set }
-
Gets or sets the major delta value.
Note
Used for axis major ticks spacing.Declaration
Objective-C
@property (nonatomic, strong) id<ISCIComparable> _Nonnull majorDelta;
Swift
var majorDelta: ISCIComparable { get set }
-
Definies the value that indicates whether to calculate ticks automatically. Default is YES.
Declaration
Objective-C
@property (nonatomic) BOOL autoTicks;
Swift
var autoTicks: Bool { get set }
-
Definies the max auto ticks amount.
Declaration
Objective-C
@property (nonatomic) unsigned int maxAutoTicks;
Swift
var maxAutoTicks: UInt32 { get set }
-
Definies the number of minor delta ticks per major tick.
Declaration
Objective-C
@property (nonatomic) unsigned int minorsPerMajor;
Swift
var minorsPerMajor: UInt32 { get set }
-
Gets or sets a flag indicating whether to flip the tick and pixel coordinate generation for this axis, causing the axis ticks to decrement and chart to be flipped in the axis direction.
Note
If YES - reverses the ticks and coordinates for the axis.Declaration
Objective-C
@property (nonatomic) BOOL flipCoordinates;
Swift
var flipCoordinates: Bool { get set }
-
Definies a flag indicating whether to draw major ticks or not.
Declaration
Objective-C
@property (nonatomic) BOOL drawMajorTicks;
Swift
var drawMajorTicks: Bool { get set }
-
Definies a flag indicating whether to draw major grid lines or not.
Declaration
Objective-C
@property (nonatomic) BOOL drawMajorGridLines;
Swift
var drawMajorGridLines: Bool { get set }
-
Definies a flag indicating whether to draw major bands or not.
Declaration
Objective-C
@property (nonatomic) BOOL drawMajorBands;
Swift
var drawMajorBands: Bool { get set }
-
Definies a flag indicating whether to draw minor ticks or not.
Declaration
Objective-C
@property (nonatomic) BOOL drawMinorTicks;
Swift
var drawMinorTicks: Bool { get set }
-
Definies a flag indicating whether to draw minor grid lines or not.
Declaration
Objective-C
@property (nonatomic) BOOL drawMinorGridLines;
Swift
var drawMinorGridLines: Bool { get set }
-
Definies a flag indicating whether to draw tick labels or not.
Declaration
Objective-C
@property (nonatomic) BOOL drawLabels;
Swift
var drawLabels: Bool { get set }
-
Defines the string with value for this axis title.
Declaration
Objective-C
@property (nonatomic, copy) NSString *_Nonnull axisTitle;
Swift
var axisTitle: String { get set }
-
Defines the attributed string with value for this axis title.
Warning
If set - current annotation instance will ignore theaxisTitle
property.Declaration
Objective-C
@property (nonatomic, copy) NSAttributedString *_Nonnull attributedAxisTitle;
Swift
@NSCopying var attributedAxisTitle: NSAttributedString { get set }
-
Gets or sets auto range mode for current axis. Default is
SCIAutoRange.SCIAutoRange_Once
.Possible values:
SCIAutoRange.SCIAutoRange_Once
- the axis will try to fit the data once.SCIAutoRange.SCIAutoRange_Always
- the axis should scale to fit the data.SCIAutoRange.SCIAutoRange_Never
- then the axis will never auto range.
Declaration
Objective-C
@property (nonatomic) SCIAutoRange autoRange;
Swift
var autoRange: SCIAutoRange { get set }
-
Gets or sets a
ISCITickProvider
instance on current axis.Note
Used to compute thedata-values
of Axis Grid Lines, Ticks and Labels.Declaration
Objective-C
@property (nonatomic, strong) id<ISCITickProvider> _Nonnull tickProvider;
Swift
var tickProvider: ISCITickProvider { get set }
-
Gets or sets a
ISCITickCoordinatesProvider
instance on current axis.Note
Used to transform thedata-values
received fromISCITickProvider
instance to the coordinates for Axis gridlines, ticks and labels drawingDeclaration
Objective-C
@property (nonatomic, strong) id<ISCITickCoordinatesProvider> _Nonnull tickCoordinatesProvider;
Swift
var tickCoordinatesProvider: ISCITickCoordinatesProvider { get set }
-
Gets or sets a
ISCILabelProvider
instance.Note
May be used to programmatically override the formatting of text and cursor labels.Declaration
Objective-C
@property (nonatomic, strong) id<ISCILabelProvider> _Nonnull labelProvider;
Swift
var labelProvider: ISCILabelProvider { get set }
-
Defines the TextFormatting string for tick labels on this axis.
Note
The format string uses the format patterns from the
Unicode Technical Standard #35
.Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *textFormatting;
Swift
var textFormatting: String? { get set }
-
Defines the text formatting string for labels on this cursor.
Note
The format string uses the format patterns from the
Unicode Technical Standard #35
.Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *cursorTextFormatting;
Swift
var cursorTextFormatting: String? { get set }
-
Defines the style which is used to draw all major grid lines on this axis.
Declaration
Objective-C
@property (nonatomic, strong) SCIPenStyle *_Nonnull majorGridLineStyle;
Swift
var majorGridLineStyle: SCIPenStyle { get set }
-
Defines the style which is used to draw all minor grid lines on this axis.
Declaration
Objective-C
@property (nonatomic, strong) SCIPenStyle *_Nonnull minorGridLineStyle;
Swift
var minorGridLineStyle: SCIPenStyle { get set }
-
Defines the style for Axis Bands.
Declaration
Objective-C
@property (nonatomic, strong) SCIBrushStyle *_Nonnull axisBandsStyle;
Swift
var axisBandsStyle: SCIBrushStyle { get set }
-
Defines the style which is used to draw all major ticks on this axis.
Declaration
Objective-C
@property (nonatomic, strong) SCIPenStyle *_Nonnull majorTickLineStyle;
Swift
var majorTickLineStyle: SCIPenStyle { get set }
-
Gets or sets the style which is used to draw all minor ticks on this axis.
Declaration
Objective-C
@property (nonatomic, strong) SCIPenStyle *_Nonnull minorTickLineStyle;
Swift
var minorTickLineStyle: SCIPenStyle { get set }
-
Gets or sets the the length of all major ticks on this axis in pixels.
Declaration
Objective-C
@property (nonatomic) float majorTickLineLength;
Swift
var majorTickLineLength: Float { get set }
-
Gets or sets the the length of all minor ticks on this axis in pixels.
Declaration
Objective-C
@property (nonatomic) float minorTickLineLength;
Swift
var minorTickLineLength: Float { get set }
-
Defines the style which is used to draw axis title.
Declaration
Objective-C
@property (nonatomic, strong) SCIFontStyle *_Nonnull titleStyle;
Swift
var titleStyle: SCIFontStyle { get set }
-
Defines the style which is used to draw all tick labels on this axis.
Declaration
Objective-C
@property (nonatomic, strong) SCIFontStyle *_Nonnull tickLabelStyle;
Swift
var tickLabelStyle: SCIFontStyle { get set }
-
Gets the current
ISCICoordinateCalculator
for this axis, based on visible range and axis type.Declaration
Objective-C
@property (nonatomic, strong, readonly) id<ISCICoordinateCalculator> _Nonnull currentCoordinateCalculator;
Swift
var currentCoordinateCalculator: ISCICoordinateCalculator { get }
-
Creates a coordinate calculator from specified visible range.
Declaration
Objective-C
- (nonnull id<ISCICoordinateCalculator>)createCoordinateCalculatorFromRange: (nonnull id<ISCIRange>)visibleRange;
Swift
func createCoordinateCalculator(from visibleRange: ISCIRange) -> ISCICoordinateCalculator
Parameters
visibleRange
The visible range to create coordinate calculator from.
Return Value
The coordinate calculator instance.
-
Animates the visible range of the axis to the destination visible range, over the specified duration.
Declaration
Objective-C
- (void)animateVisibleRangeTo:(nonnull id<ISCIRange>)range withDuration:(float)duration;
Swift
func animateVisibleRange(to range: ISCIRange, withDuration duration: Float)
Parameters
range
The end range.
duration
The duration of the animation.
-
Gets whether
visibleRange
is valid, e.g. is notnil
, the difference betweenMax
andMin
is positive.Declaration
Objective-C
@property (nonatomic, readonly) BOOL hasValidVisibleRange;
Swift
var hasValidVisibleRange: Bool { get }
-
Gets whether the
visibleRange
has default value.Declaration
Objective-C
@property (nonatomic, readonly) BOOL hasDefaultVisibleRange;
Swift
var hasDefaultVisibleRange: Bool { get }
-
Gets the default non zero
ISCIRange
, called internally by SciChart to reset thevisibleRange
of an axis to an default state. -
Used internally for notification of axis when data range changes.
Declaration
Objective-C
- (void)onDataRangeChanged;
Swift
func onDataRangeChanged()
-
Converts given the x or y pixel coordinate to the data value at this coordinate.
Declaration
Objective-C
- (nonnull id<ISCIComparable>)getDataValueFrom:(float)pixelCoordinate;
Swift
func getDataValue(_ pixelCoordinate: Float) -> ISCIComparable
Parameters
pixelCoordinate
The coordinate in pixels to convert.
Return Value
The data value.
-
Converts given data value to the x or y pixel coordinate on this axis.
Declaration
Objective-C
- (float)getCoordinateFrom:(nonnull id<ISCIComparable>)value;
Swift
func getCoordinate(_ value: ISCIComparable) -> Float
Parameters
value
The data value to convert.
Return Value
The coordinate in pixels.
-
Gets or sets the visibility of the Axis.
Declaration
Objective-C
@property (nonatomic) BOOL isVisible;
Swift
var isVisible: Bool { get set }
-
Gets the axis viewport dimension, which is used by
ISCICoordinateCalculator
of the Axis.Declaration
Objective-C
@property (nonatomic, readonly) CGFloat axisViewportDimension;
Swift
var axisViewportDimension: CGFloat { get }
-
String formats the text.
Declaration
Objective-C
- (nonnull id<ISCIString>)formatText:(nonnull id<ISCIComparable>)value;
Swift
func formatText(_ value: ISCIComparable) -> ISCIString
Parameters
value
The data value to format.
Return Value
The string formatted data value.
-
String formats text for the cursor.
Declaration
Objective-C
- (nonnull id<ISCIString>)formatCursorText:(nonnull id<ISCIComparable>)value;
Swift
func formatCursorText(_ value: ISCIComparable) -> ISCIString
Parameters
value
The data value to format.
Return Value
The string formatted data value.
-
Gets the maximum range of the axis, based on the
data-range
of all series.Note
Computed property, which is calculated via-getMaximumRange:
without force cache updating. -
Gets the maximum range of the axis, based on the
data-range
of all series.Declaration
Objective-C
- (nonnull id<ISCIRange>)getMaximumRange:(BOOL)forceCacheUpdate;
Swift
func getMaximumRange(_ forceCacheUpdate: Bool) -> ISCIRange
Parameters
forceCacheUpdate
Flag indicating whether the cached results should be updated.
Return Value
The maximum range for this axis.
-
Gets the data range (full extents of the data) of the Axis.
Note
Computed property, which is calculated via-getDataRange:
without force cache updating. -
Gets the data range (full extents of the data) of the Axis.
Declaration
Objective-C
- (nonnull id<ISCIRange>)getDataRange:(BOOL)forceCacheUpdate;
Swift
func getDataRange(_ forceCacheUpdate: Bool) -> ISCIRange
Parameters
forceCacheUpdate
Flag indicating whether the cached results should be updated.
Return Value
The data range for this axis.
-
Defines the
SCIVisibleRangeChangeListener
for this axis instance.Declaration
Objective-C
@property (nonatomic, strong, nullable) SCIVisibleRangeChangeListener visibleRangeChangeListener;
Swift
var visibleRangeChangeListener: SCIVisibleRangeChangeListener? { get set }
-
Defines the
SCIDataRangeChangeListener
for this axis instance.Declaration
Objective-C
@property (nonatomic, strong, nullable) SCIDataRangeChangeListener dataRangeChangeListener;
Swift
var dataRangeChangeListener: SCIDataRangeChangeListener? { get set }
-
Gets the lock for current axis params. Used internally for synchronization of axis updated during render pass
Declaration
Objective-C
@property (nonatomic, readonly) id<ISCIReadWriteLock> _Nonnull axisParamsLock;
Swift
var axisParamsLock: ISCIReadWriteLock { get }