iOS Charting Documentation - SciChart iOS Charts SDK v3.x

ISCIAnnotation

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

  • Defines the block to get notification about changes in LayoutManager.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        SCIAxisAlignmentChangedListener axisAlignmentChangedListener;

    Swift

    var axisAlignmentChangedListener: SCIAxisAlignmentChangedListener! { get set }
  • Defines the ID of the X-Axis which this Annotation is measured against.

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

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

    Swift

    weak var yAxis: ISCIAxis! { get }
  • Detines the value indicating whether this annotation is selected or not

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL isSelected;

    Swift

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

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL isEditable;

    Swift

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

    Declaration

    Objective-C

    @property (assign, readwrite, 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 (assign, readwrite, nonatomic)
        SCIAnnotationSurfaceEnum annotationSurface;

    Swift

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

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) SCIDirection2D dragDirections;

    Swift

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

    Declaration

    Objective-C

    @property (assign, readwrite, 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:(id<ISCIAxis>)xAxis yAxis:(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:(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:(int)index;

    Swift

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

    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.