
iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
ISCIAnnotation
@protocol ISCIAnnotation <ISCIAttachable, ISCIInvalidatableElement,
ISCIThemeable, ISCISuspendable,
ISCIReceiveGestureEvents, ISCIAdornerProvider,
ISCIServiceProvider, ISCIAxesChangeListener>
Defines the interface to an annotation, a custom drawable element over or under the SCIChartSurface
.
-
Defines the ID of the
X-Axis
which thisAnnotation
is measured against.See
ISCIAxisCore.axisId
.Declaration
Objective-C
@property (nonatomic, copy) NSString *_Nonnull xAxisId;
-
Defines the ID of the
Y-Axis
which thisAnnotation
is measured against.See
ISCIAxisCore.axisId
.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;
-
Defines the
X1 Coordinate
of the Annotation.Note
ForSCIAnnotationCoordinateMode.SCIAnnotationCoordinateMode_Absolute
, this must be adata-value
on the X-Axis such as a double forSCINumericAxis
.Note
ForSCIAnnotationCoordinateMode.SCIAnnotationCoordinateMode_Relative
, this must be a double valuebetween 0.0 and 1.0
, where 0.0 is the far left of the X-Axis and 1.0 is the far right.Declaration
Objective-C
@property (nonatomic, strong) NS_REFINED_FOR_SWIFT id<ISCIComparable> x1;
-
Defines the
Y1 Coordinate
of the Annotation.Note
ForSCIAnnotationCoordinateMode.SCIAnnotationCoordinateMode_Absolute
, this must be adata-value
on the Y-Axis such as a double forSCINumericAxis
.Note
ForSCIAnnotationCoordinateMode.SCIAnnotationCoordinateMode_Relative
, this must be a double valuebetween 0.0 and 1.0
, where 0.0 is the far top of the X-Axis and 1.0 is the far bottom.Declaration
Objective-C
@property (nonatomic, strong) NS_REFINED_FOR_SWIFT id<ISCIComparable> y1;
-
Defines the
X2 Coordinate
of the Annotation.Note
ForSCIAnnotationCoordinateMode.SCIAnnotationCoordinateMode_Absolute
, this must be adata-value
on the X-Axis such as a double forSCINumericAxis
.Note
ForSCIAnnotationCoordinateMode.SCIAnnotationCoordinateMode_Relative
, this must be a double valuebetween 0.0 and 1.0
, where 0.0 is the far left of the X-Axis and 1.0 is the far right.Declaration
Objective-C
@property (nonatomic, strong) NS_REFINED_FOR_SWIFT id<ISCIComparable> x2;
-
Defines the
Y2 Coordinate
of the Annotation.Note
ForSCIAnnotationCoordinateMode.SCIAnnotationCoordinateMode_Absolute
, this must be adata-value
on the Y-Axis such as a double forSCINumericAxis
.Note
ForSCIAnnotationCoordinateMode.SCIAnnotationCoordinateMode_Relative
, this must be a double valuebetween 0.0 and 1.0
, where 0.0 is the far top of the X-Axis and 1.0 is the far bottom.Declaration
Objective-C
@property (nonatomic, strong) NS_REFINED_FOR_SWIFT id<ISCIComparable> y2;
-
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 isSCIAnnotationSurfaceEnum.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
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.
-
Draws this
ISCIAnnotation
instance below chart series.Declaration
Objective-C
- (void) onDrawBelowSurfaceWithContext:(nonnull id<ISCIRenderContext2D>)renderContext assetManager:(nonnull id<ISCIAssetManager2D>)assetManager;
Parameters
renderContext
The render context instance to draw on.
assetManager
The asset manager associated with render context.
-
Draws this
ISCIAnnotation
instance above chart series.Declaration
Objective-C
- (void) onDrawAboveSurfaceWithContext:(nonnull id<ISCIRenderContext2D>)renderContext assetManager:(nonnull id<ISCIAssetManager2D>)assetManager;
Parameters
renderContext
The render context instance to draw on.
assetManager
The asset manager associated with render context.
-
Draws this
ISCIAnnotation
instance on one appropriate axis.Declaration
Objective-C
- (void)onDrawOnAxisWithContext:(nonnull id<ISCIRenderContext2D>)renderContext assetManager:(nonnull id<ISCIAssetManager2D>)assetManager;
Parameters
renderContext
The render context instance to draw on.
assetManager
The asset manager associated with render context.
-
Tries to select this
ISCIAnnotation
instance.Declaration
Objective-C
- (BOOL)onTrySelectAnnotation;
Return Value
YES - if selection is successful.
-
Defines the
ISCIAnnotationDragListener
which is called when drag event occurs on this annotation.Declaration
Objective-C
@property (nonatomic, strong, nullable) id<ISCIAnnotationDragListener> annotationDragListener;
-
Sets the listener which is called when
isSelected
property changes.Declaration
Objective-C
@property (nonatomic, strong, nullable) SCIAnnotationSelectionChangedListener annotationSelectionChangedListener;
-
Sets the listener which is called when
isHidden
property changes.Declaration
Objective-C
@property (nonatomic, strong, nullable) SCIAnnotationIsHiddenChangedListener annotationIsHiddenChangedListener;
-
Defines the block to get notification about changes in LayoutManager.
Declaration
Objective-C
@property (nonatomic, strong, nullable) SCIAxisAlignmentChangedListener axisAlignmentChangedListener;