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

SCIAnnotationBase

@interface SCIAnnotationBase
    : NSObject <ISCIAnnotation, ISCIChartSurfaceProvider>

Provides a base class for annotations to be rendered over the chart.

  • Defines the SCIAnnotationCoordinateMode to use when placing the annotation.

    Note

    E.g. the default Absolute requires that X1, Y1, X2, Y2 are data-values. The Relative requires that X1, Y1, X2, Y2 are double values from 0.0 to 1.0.

    Declaration

    Objective-C

    @property (nonatomic) SCIAnnotationCoordinateMode coordinateMode;

    Swift

    var coordinateMode: SCIAnnotationCoordinateMode { get set }
  • Defines the z-index position for this annotation.

    Declaration

    Objective-C

    @property (nonatomic) int zIndex;

    Swift

    var zIndex: Int32 { get set }
  • Defines the ISCIResizingGrip instance for this annotation.

    Declaration

    Objective-C

    @property (nonatomic, strong) id<ISCIResizingGrip> _Nonnull resizingGrip;

    Swift

    var resizingGrip: ISCIResizingGrip { get set }
  • Defines the ISCIAnnotationSelectionDrawable instance for this annotation.

    Declaration

    Objective-C

    @property (nonatomic, strong) id<ISCIAnnotationSelectionDrawable> _Nonnull annotationSelectionDrawable;

    Swift

    var annotationSelectionDrawable: ISCIAnnotationSelectionDrawable { get set }
  • Defines if a annotation should be clipped to it’s parrent annotation surface.

    Declaration

    Objective-C

    @property (nonatomic) BOOL clipAdornerToAnnotationSurface;

    Swift

    var clipAdornerToAnnotationSurface: Bool { get set }
  • Determines whether the coordinate is valid for placing on the canvas, e.g. is greater than zero and less than canvasMeasurement.

    Declaration

    Objective-C

    - (BOOL)isCoordinateValid:(CGFloat)coord withSize:(CGFloat)size;

    Swift

    func isCoordinateValid(_ coord: CGFloat, withSize size: CGFloat) -> Bool

    Parameters

    coord

    the coordinate.

    size

    The canvas dimension in this axis.

    Return Value

    YES - if coordinate is valid, otherwise - NO.

  • Gets the position of resizing grip with specified index

    Declaration

    Objective-C

    - (CGPoint)getResizingGripPositionFor:
        (SCIAnnotationPointIndex)resizingGripIndex;

    Swift

    func getResizingGripPosition(for resizingGripIndex: SCIAnnotationPointIndex) -> CGPoint

    Parameters

    resizingGripIndex

    Index of resizing grip

    Return Value

    Position of resizing grip