iOS Charting Documentation - SciChart iOS Charts SDK v3.x

ISCIAxisLayoutStrategy

@protocol ISCIAxisLayoutStrategy <NSObject>

Defines interface for layout strategy which determines how axes should be placed in SCIChartSurface.

  • Adds axis into this ISCIAxisLayoutStrategy instance.

    Declaration

    Objective-C

    - (void)addAxis:(id<ISCIAxis>)axis;

    Swift

    func add(_ axis: ISCIAxis!)

    Parameters

    axis

    The axis to add.

  • Removes axis from this ISCIAxisLayoutStrategy` instance.

    Declaration

    Objective-C

    - (void)removeAxis:(id<ISCIAxis>)axis;

    Swift

    func remove(_ axis: ISCIAxis!)

    Parameters

    axis

    The axis to remove.

  • Measures required amount of space to place axes which are currently attached to this ISCIAxisLayoutStrategy instance.

    Declaration

    Objective-C

    - (void)measureAxesWithAvailableWidth:(CGFloat)width
                                   height:(CGFloat)height
                      andChartLayoutState:(SCIChartLayoutState *)chartLayoutState;

    Swift

    func measureAxes(withAvailableWidth width: CGFloat, height: CGFloat, andChartLayoutState chartLayoutState: SCIChartLayoutState!)

    Parameters

    width

    The available width in pixels.

    height

    The available height in pixels.

    chartLayoutState

    The SCIChartLayoutState state for this layout pass which strategy should modify to set desired size.

  • Perform layout on axes which use this layout strategy.

    Declaration

    Objective-C

    - (void)layoutWithLeft:(CGFloat)left
                       top:(CGFloat)top
                     right:(CGFloat)right
                    bottom:(CGFloat)bottom;

    Swift

    func layout(withLeft left: CGFloat, top: CGFloat, right: CGFloat, bottom: CGFloat)

    Parameters

    left

    left position of area relative to parent SCIChartSurface.

    top

    top position of area relative to parent SCIChartSurface.

    right

    right position of area relative to parent SCIChartSurface.

    bottom

    bottom position of area relative to parent SCIChartSurface.