iOS Charting Documentation - SciChart iOS Charts SDK v3.x

SCIAxisCollection

@interface SCIAxisCollection : SCIObservableCollection < id <ISCIAxis>
> @end

Contains a collection of ISCIAxis and allows getting of axis by Id.

  • Initializes a new instance of SCIAxisCollection class.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithCollection:
        (nonnull NSArray<id<ISCIAxis>> *)collection;

    Swift

    init(collection: [ISCIAxis])

    Parameters

    collection

    The collections with items to add.

  • Gets the primary axis in the collection. This is the first axis that has ISCIAxis.isPrimaryAxis set to YES, or nil - if none exists.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic, nullable) id<ISCIAxis> primaryAxis;

    Swift

    var primaryAxis: ISCIAxis? { get }
  • Gets the value indicating whether this collection has primary axis.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL hasPrimaryAxis;

    Swift

    var hasPrimaryAxis: Bool { get }

    Return Value

    YES - if any of the Axes in the collection have ISCIAxis.isPrimaryAxis set to YES.

  • Gets the default axis, which is equal to the axis with the DEFAULT_AXIS_ID, else - nil.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) id<ISCIAxis> _Nonnull defaultAxis;

    Swift

    var defaultAxis: ISCIAxis { get }
  • Gets the axis specified by id if it exists, otherwise returns nil.

    Declaration

    Objective-C

    - (nonnull id<ISCIAxis>)getAxisById:(nonnull NSString *)axisId;

    Swift

    func getAxisById(_ axisId: String) -> ISCIAxis

    Parameters

    axisId

    The axis id.

    Return Value

    The axis with specified id if it exists, otherwise returns nil.

  • Gets the axis specified by id if it exists, otherwise returns nil.

    Declaration

    Objective-C

    - (nonnull id<ISCIAxis>)getAxisById:(nonnull NSString *)axisId
                       assertAxisExists:(BOOL)assertAxisExists;

    Swift

    func getAxisById(_ axisId: String, assertAxisExists: Bool) -> ISCIAxis

    Parameters

    axisId

    The axis id.

    assertAxisExists

    If set to YES assert and throw if the axis does not exist.

    Return Value

    The axis with specified id if it exists, otherwise returns nil.