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

ISCIAnnotation

Defines the interface to an annotation, a custom drawable element over or under the SCIChartSurface.

  • Defines the ID of the X-Axis which this Annotation is measured against.

    Declaration

    Objective-C

    @property (nonatomic, copy) NSString *_Nonnull xAxisId;

    Swift

    var xAxisId: String { get set }
  • Defines the ID of the Y-Axis which this Annotation is measured against.

    Declaration

    Objective-C

    @property (nonatomic, copy) NSString *_Nonnull yAxisId;

    Swift

    var yAxisId: String { get set }
  • Gets the X-Axis instance associated with this annotation.

    Declaration

    Objective-C

    @property (nonatomic, weak, readonly, nullable) id<ISCIAxis> xAxis;

    Swift

    weak var xAxis: ISCIAxis? { get }
  • Gets the Y-Axis instance associated with this annotation.

    Declaration

    Objective-C

    @property (nonatomic, weak, readonly, nullable) id<ISCIAxis> yAxis;

    Swift

    weak var yAxis: ISCIAxis? { get }
  • Get whether this ISCIAnnotation instance is enabled for interaction.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isEnabled;

    Swift

    var isEnabled: Bool { get }
  • Detines the value indicating whether this annotation is selected or not

    Declaration

    Objective-C

    @property (nonatomic) BOOL isSelected;

    Swift

    var isSelected: Bool { get set }
  • Defines the value indicating whether this annotation is editable or not.

    Declaration

    Objective-C

    @property (nonatomic) BOOL isEditable;

    Swift

    var isEditable: Bool { get set }
  • Defines the value indicating whether this annotation is hidden or not.

    Declaration

    Objective-C

    @property (nonatomic) BOOL isHidden;

    Swift

    var isHidden: Bool { get set }
  • Defines the Surface to place the annotation on. The default is SCIAnnotationSurfaceEnum.SCIAnnotationSurface_AboveChart.

    Declaration

    Objective-C

    @property (nonatomic) SCIAnnotationSurfaceEnum annotationSurface;

    Swift

    var annotationSurface: SCIAnnotationSurfaceEnum { get set }
  • Defines the SCIDirection2D with the Drag direction for this annotation.

    Declaration

    Objective-C

    @property (nonatomic) SCIDirection2D dragDirections;

    Swift

    var dragDirections: SCIDirection2D { get set }
  • Defines the SCIDirection2D with the Resize direction for this annotation.

    Declaration

    Objective-C

    @property (nonatomic) SCIDirection2D resizeDirections;

    Swift

    var resizeDirections: SCIDirection2D { get set }
  • Updates the coordinate calculators and refreshes the annotation position on the parent ISCIChartSurface.

    Declaration

    Objective-C

    - (void)updateWithXAxis:(nonnull id<ISCIAxis>)xAxis
                      yAxis:(nonnull id<ISCIAxis>)yAxis;

    Swift

    func update(withXAxis xAxis: ISCIAxis, yAxis: ISCIAxis)

    Parameters

    xAxis

    The X-Axis instance.

    yAxis

    The Y-Axis instance.

  • Shows annotation which being hidden by -hide method.

    Declaration

    Objective-C

    - (void)show;

    Swift

    func show()
  • Hides the Annotation by removing it and its adorner markers from the parent ISCIChartSurface.

    Declaration

    Objective-C

    - (void)hide;

    Swift

    func hide()
  • Checks whether coordinates are within canvas bounds.

    Declaration

    Objective-C

    - (BOOL)isCoordinates:(nonnull SCIAnnotationCoordinates *)coordinates
                 inBounds:(CGRect)bounds;

    Swift

    func isCoordinates(_ coordinates: SCIAnnotationCoordinates, inBounds bounds: CGRect) -> Bool

    Parameters

    coordinates

    The annotation coordinates.

    bounds

    The parent annotation surface bounds.

    Return Value

    YES - if annotation is in bounds.

  • This method is used in internally to set an adorner point position.

    Declaration

    Objective-C

    - (void)moveBasePointTo:(CGPoint)point atIndex:(SCIAnnotationPointIndex)index;

    Swift

    func moveBasePoint(to point: CGPoint, at index: SCIAnnotationPointIndex)

    Parameters

    point

    The new x-y coordinate of base point in pixels.

    index

    The index of base point to move.

  • This method is used in internally to move annotation in X and Y direction.

    Declaration

    Objective-C

    - (void)moveAnnotationByXDelta:(CGFloat)xDelta yDelta:(CGFloat)yDelta;

    Swift

    func move(byXDelta xDelta: CGFloat, yDelta: CGFloat)

    Parameters

    xDelta

    The horizontal offset in pixels.

    yDelta

    The vertical offset in pixels.

  • Tries to select this ISCIAnnotation instance.

    Declaration

    Objective-C

    - (BOOL)onTrySelectAnnotation;

    Swift

    func onTrySelect() -> Bool

    Return Value

    YES - if selection is successful.