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

ISCILayoutManager

@protocol ISCILayoutManager <ISCIAttachable>

Defines interface to a Layout Manager, which may be used to layout SCIChartSurface parts.

  • Attaches axis to parent SCIChartSurface via current LayoutManager.

    Declaration

    Objective-C

    - (void)attachAxis:(id<ISCIAxis>)axis isXAxis:(BOOL)isXAxis;

    Swift

    func attach(_ axis: ISCIAxis!, isXAxis: Bool)

    Parameters

    axis

    The ISCIAxis to attach.

    isXAxis

    The value indicating whether the axis is XAxis or YAxis.

  • Detaches axis from parent SCIChartSurface via current LayoutManager.

    Declaration

    Objective-C

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

    Swift

    func detach(_ axis: ISCIAxis!)

    Parameters

    axis

    The ISCIAxis to detach.

  • Called when axis is about to change its placement.

    Declaration

    Objective-C

    - (void)onAxisPlacementChanged:(id<ISCIAxis>)axis
                  oldAxisAlignment:(SCIAxisAlignment)oldAxisAlignment
                   oldIsCenterAxis:(BOOL)oldIsCenterAxis
                  newAxisAlignment:(SCIAxisAlignment)newAxisAlignment
                   newIsCenterAxis:(BOOL)newIsCenterAxis;

    Swift

    func onAxisPlacementChanged(_ axis: ISCIAxis!, oldAxisAlignment: SCIAxisAlignment, oldIsCenterAxis: Bool, newAxisAlignment: SCIAxisAlignment, newIsCenterAxis: Bool)

    Parameters

    axis

    axis which changes its position.

    oldAxisAlignment

    old axis alignment value.

    oldIsCenterAxis

    old isCenterAxis value.

    newAxisAlignment

    new axis alignment value.

    newIsCenterAxis

    new isCenterAxis value.

  • Called during render pass of chart before rendering and should update positions of chart parts.

    Declaration

    Objective-C

    - (CGSize)onLayoutChartWithAvailableSize:(CGSize)size;

    Swift

    func onLayoutChart(withAvailableSize size: CGSize) -> CGSize

    Parameters

    size

    available viewport size.

    Return Value

    The measured size of viewport.