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

ISCIAxis

Defines the base interface to an Axis used throughout SciChart 2D.

  • Gets or sets whether current Axis is the main one in axis collection.

    Note

    This is the axis which is responsible for drawing grid lines.

    Declaration

    Objective-C

    @property (nonatomic) BOOL isPrimaryAxis;

    Swift

    var isPrimaryAxis: Bool { get set }
  • Gets or sets whether this axis is an X-Axis or not.

    Declaration

    Objective-C

    @property (nonatomic) BOOL isXAxis;

    Swift

    var isXAxis: Bool { get set }
  • Gets or sets whether current Axis should be placed in the center of the chart or not.

    Declaration

    Objective-C

    @property (nonatomic) BOOL isCenterAxis;

    Swift

    var isCenterAxis: Bool { get set }
  • Deprecated

    Please use currentCoordinateCalculator ICoordinateCalculator.isCategoryAxisCalculator

    Gets a value indicating whether this instance is a category axis.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isCategoryAxis;

    Swift

    var isCategoryAxis: Bool { get }
  • Gets whether this axis is horizontal or not.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isHorizontalAxis;

    Swift

    var isHorizontalAxis: Bool { get }
  • Gets whether this axis is flipped (e.g Y-Axis on the bottom or top, or X-Axis on the left or right).

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isAxisFlipped;

    Swift

    var isAxisFlipped: Bool { get }
  • Gets or sets the SCIAxisAlignment for this Axis.

    Declaration

    Objective-C

    @property (nonatomic) SCIAxisAlignment axisAlignment;

    Swift

    var axisAlignment: SCIAxisAlignment { get set }
  • Gets or sets the Axis Orientation, e.g. Horizontal (XAxis) or Vertical (YAxis).

    Declaration

    Objective-C

    @property (nonatomic) SCIOrientation orientation;

    Swift

    var orientation: SCIOrientation { get set }
  • Gets or sets a value indicating whether label culling is enabled (when labels overlap) on this axis instance.

    Declaration

    Objective-C

    @property (nonatomic) BOOL isLabelCullingEnabled;

    Swift

    var isLabelCullingEnabled: Bool { get set }
  • Gets a value indicating whether marginal labels get shifted to fit inside an axis when too long.

    Declaration

    Objective-C

    @property (nonatomic) BOOL autoFitMarginalLabels;

    Swift

    var autoFitMarginalLabels: Bool { get set }
  • Gets or sets axis title placement.

    Declaration

    Objective-C

    @property (nonatomic) SCIAxisTitlePlacement axisTitlePlacement;

    Swift

    var axisTitlePlacement: SCIAxisTitlePlacement { get set }
  • Gets or sets axis title orientation.

    Declaration

    Objective-C

    @property (nonatomic) SCIAxisTitleOrientation axisTitleOrientation;

    Swift

    var axisTitleOrientation: SCIAxisTitleOrientation { get set }
  • Gets or sets axis title alignment.

    Declaration

    Objective-C

    @property (nonatomic) SCIAlignment axisTitleAlignment;

    Swift

    var axisTitleAlignment: SCIAlignment { get set }
  • Defines axis title margins.

    Note

    Defines spacing to use when laying out content in the view.

    Declaration

    Objective-C

    @property (nonatomic) UIEdgeInsets axisTitleMargins;

    Swift

    var axisTitleMargins: UIEdgeInsets { get set }
  • Defines style for axis tick labels.

    Declaration

    Objective-C

    @property (nonatomic, strong) SCIAxisTickLabelStyle *_Nonnull axisTickLabelStyle;

    Swift

    var axisTickLabelStyle: SCIAxisTickLabelStyle { get set }
  • Gets the current ISCIAxisInteractivityHelper for this Axis.

    Declaration

    Objective-C

    @property (strong, readonly) id<ISCIAxisInteractivityHelper> _Nonnull currentInteractivityHelper;

    Swift

    var currentInteractivityHelper: ISCIAxisInteractivityHelper { get }
  • Called by the SCIChartSurface internally.

    Note

    Returns the max range only for that axis(by the data-series on it)

    Declaration

    Objective-C

    - (nonnull id<ISCIRange>)getWindowedYRangeWithXRanges:
        (nullable NSDictionary<NSString *, id<ISCICoordinateCalculator>> *)
            xCoordCalcs;

    Swift

    func getWindowedYRange(withXRanges xCoordCalcs: [String : ISCICoordinateCalculator]?) -> ISCIRange

    Parameters

    xCoordCalcs

    Calculates the max range based on corresponding x coordinate calculators.

    Return Value

    The calculated windowed YRange.

  • Scrolls current ISCIAxisCore.visibleRange by specified number of pixels.

    Note

    e.g. SCIClipMode_ClipAtExtents prevents panning outside of the Axis, SCIClipMode_None allows panning outside.

    Declaration

    Objective-C

    - (void)scrollByPixels:(CGFloat)pixelsToScroll clipMode:(SCIClipMode)clipMode;

    Swift

    func scroll(byPixels pixelsToScroll: CGFloat, clipMode: SCIClipMode)

    Parameters

    pixelsToScroll

    Scroll N pixles from the current visible range.

    clipMode

    Defines how scrolling behaves when you reach the edge of the Axis extents.

  • Scrolls current ISCIAxisCore.visibleRange by the specified number of pixels with the specified animation duration.

    Note

    e.g. SCIClipMode_ClipAtExtents prevents panning outside of the Axis, SCIClipMode_None allows panning outside.

    Declaration

    Objective-C

    - (void)scrollByPixels:(CGFloat)pixelsToScroll
                  clipMode:(SCIClipMode)clipMode
                  duration:(NSTimeInterval)duration;

    Swift

    func scroll(byPixels pixelsToScroll: CGFloat, clipMode: SCIClipMode, duration: TimeInterval)

    Parameters

    pixelsToScroll

    Scroll N pixels from the current visible range

    clipMode

    Defines how scrolling behaves when you reach the edge of the Axis extents.

    duration

    The duration of animation when zooming to extents.

  • Scrolls current ISCIAxisCore.visibleRange by the specified number of pixels with the specified animation duration.

    Declaration

    Objective-C

    - (void)scrollByPixels:(CGFloat)pixelsToScroll
                  clipMode:(SCIClipMode)clipMode
                clipTarget:(SCIClipModeTarget)clipTarget;

    Swift

    func scroll(byPixels pixelsToScroll: CGFloat, clipMode: SCIClipMode, clipTarget: SCIClipModeTarget)

    Parameters

    pixelsToScroll

    Scroll N pixels from the current visible range.

    clipMode

    Defines how scrolling behaves when you reach the edge of the Axis extents.

    clipTarget

    Defines target which is used for clipping.

  • Scrolls current ISCIAxisCore.visibleRange by the specified number of pixels with the specified animation duration.

    Declaration

    Objective-C

    - (void)scrollByPixels:(CGFloat)pixelsToScroll
                  clipMode:(SCIClipMode)clipMode
                clipTarget:(SCIClipModeTarget)clipTarget
                  duration:(NSTimeInterval)duration;

    Swift

    func scroll(byPixels pixelsToScroll: CGFloat, clipMode: SCIClipMode, clipTarget: SCIClipModeTarget, duration: TimeInterval)

    Parameters

    pixelsToScroll

    Scroll N pixels from the current visible range.

    clipMode

    Defines how scrolling behaves when you reach the edge of the Axis extents.

    clipTarget

    Defines target which is used for clipping.

    duration

    The duration of animation when zooming to extents.

  • Performs zoom on current Axis, using fromCoord as a coordinate of new range start and toCoord as a coordinate of new range end.

    Declaration

    Objective-C

    - (void)zoomFrom:(CGFloat)fromCoord to:(CGFloat)toCoord;

    Swift

    func zoom(from fromCoord: CGFloat, to toCoord: CGFloat)

    Parameters

    fromCoord

    The coordinate of new range start in pixels.

    toCoord

    The coordinate of new range end in pixels.

  • Performs zoom on current Axis, using fromCoord as a coordinate of new range start and toCoord as a coordinate of new range end.

    Declaration

    Objective-C

    - (void)zoomFrom:(CGFloat)fromCoord
                  to:(CGFloat)toCoord
            duration:(NSTimeInterval)duration;

    Swift

    func zoom(from fromCoord: CGFloat, to toCoord: CGFloat, duration: TimeInterval)

    Parameters

    fromCoord

    The coordinate of new range start in pixels.

    toCoord

    The coordinate of new range end in pixels.

    duration

    The duration of animation when zooming to extents.

  • Performs zoom on current Axis, using minFraction as a multuplier of range start and maxFraction as a multiplier of range end.

    Declaration

    Objective-C

    - (void)zoomByFractionMin:(CGFloat)minFraction max:(CGFloat)maxFraction;

    Swift

    func zoom(byFractionMin minFraction: CGFloat, max maxFraction: CGFloat)

    Parameters

    minFraction

    The miltiplier of range start.

    maxFraction

    The miltiplier of range end.

  • Performs zoom on current Axis, using minFraction as a multuplier of range start and maxFraction as a multiplier of range end.

    Declaration

    Objective-C

    - (void)zoomByFractionMin:(CGFloat)minFraction
                          max:(CGFloat)maxFraction
                     duration:(NSTimeInterval)duration;

    Swift

    func zoom(byFractionMin minFraction: CGFloat, max maxFraction: CGFloat, duration: TimeInterval)

    Parameters

    minFraction

    The miltiplier of range start.

    maxFraction

    The miltiplier of range end.

    duration

    The duration of animation when zooming to extents.

  • Perform a HitTest on this Axis at specified data point.

    Declaration

    Objective-C

    - (nonnull SCIAxisInfo *)hitTestValue:(nonnull id<ISCIComparable>)value;

    Swift

    func hitTestValue(_ value: ISCIComparable) -> SCIAxisInfo

    Parameters

    value

    data value for hit test.

    Return Value

    The SCIAxisInfo which contains the HitTest results.

  • Gets or sets the ISCIAxisInfoProvider instance associated with this axis.

    Declaration

    Objective-C

    @property (nonatomic, strong) id<ISCIAxisInfoProvider> _Nonnull axisInfoProvider;

    Swift

    var axisInfoProvider: ISCIAxisInfoProvider { get set }
  • Gets or sets the ISCIAxisInfoProvider instance associated with this axis.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) id<ISCIAxisModifierSurface> _Nonnull axisModifierSurface;

    Swift

    var axisModifierSurface: ISCIAxisModifierSurface { get }
  • Updates measurements of axis for proper layout of its content.

    Declaration

    Objective-C

    - (void)updateAxisMeasurements;

    Swift

    func updateMeasurements()
  • Gets current SCIAxisLayoutState for this axis instance.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) SCIAxisLayoutState *_Nonnull axisLayoutState;

    Swift

    var axisLayoutState: SCIAxisLayoutState { get }
  • Gets offset, which is used by ISCICoordinateCalculator of this Axis.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat axisOffset;

    Swift

    var axisOffset: CGFloat { get }
  • Performs core update of axis.

    Declaration

    Objective-C

    - (void)updateCore:(nonnull SCIRenderPassState *)renderPassState;

    Swift

    func updateCore(_ renderPassState: SCIRenderPassState)

    Parameters

    renderPassState

    The SCIRenderPassState instance for current render pass.