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;
  • Defines the ID of the Y-Axis which this Annotation is measured against.

    Declaration

    Objective-C

    @property (nonatomic, copy) NSString *_Nonnull yAxisId;
  • Gets the X-Axis instance associated with this annotation.

    Declaration

    Objective-C

    @property (nonatomic, weak, readonly, nullable) id<ISCIAxis> xAxis;
  • Gets the Y-Axis instance associated with this annotation.

    Declaration

    Objective-C

    @property (nonatomic, weak, readonly, nullable) id<ISCIAxis> yAxis;
  • Get whether this ISCIAnnotation instance is enabled for interaction.

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isEnabled;
  • Detines the value indicating whether this annotation is selected or not

    Declaration

    Objective-C

    @property (nonatomic) BOOL isSelected;
  • Defines the value indicating whether this annotation is editable or not.

    Declaration

    Objective-C

    @property (nonatomic) BOOL isEditable;
  • Defines the value indicating whether this annotation is hidden or not.

    Declaration

    Objective-C

    @property (nonatomic) BOOL isHidden;
  • Defines the Surface to place the annotation on. The default is SCIAnnotationSurfaceEnum.SCIAnnotationSurface_AboveChart.

    Declaration

    Objective-C

    @property (nonatomic) SCIAnnotationSurfaceEnum annotationSurface;
  • Defines the SCIDirection2D with the Drag direction for this annotation.

    Declaration

    Objective-C

    @property (nonatomic) SCIDirection2D dragDirections;
  • Defines the SCIDirection2D with the Resize direction for this annotation.

    Declaration

    Objective-C

    @property (nonatomic) SCIDirection2D resizeDirections;
  • 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;

    Parameters

    xAxis

    The X-Axis instance.

    yAxis

    The Y-Axis instance.

  • Shows annotation which being hidden by -hide method.

    Declaration

    Objective-C

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

    Declaration

    Objective-C

    - (void)hide;
  • Checks whether coordinates are within canvas bounds.

    Declaration

    Objective-C

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

    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;

    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;

    Parameters

    xDelta

    The horizontal offset in pixels.

    yDelta

    The vertical offset in pixels.

  • Tries to select this ISCIAnnotation instance.

    Declaration

    Objective-C

    - (BOOL)onTrySelectAnnotation;

    Return Value

    YES - if selection is successful.