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-Axiswhich thisAnnotationis measured against.See
ISCIAxisCore.axisId.Declaration
Objective-C
@property (nonatomic, copy) NSString *_Nonnull xAxisId;Swift
var xAxisId: String { get set } -
Defines the ID of the
Y-Axiswhich thisAnnotationis measured against.See
ISCIAxisCore.axisId.Declaration
Objective-C
@property (nonatomic, copy) NSString *_Nonnull yAxisId;Swift
var yAxisId: String { get set }
-
Defines the
X1 Coordinateof the Annotation.Note
ForSCIAnnotationCoordinateMode.SCIAnnotationCoordinateMode_Absolute, this must be adata-valueon 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 Coordinateof the Annotation.Note
ForSCIAnnotationCoordinateMode.SCIAnnotationCoordinateMode_Absolute, this must be adata-valueon 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 Coordinateof the Annotation.Note
ForSCIAnnotationCoordinateMode.SCIAnnotationCoordinateMode_Absolute, this must be adata-valueon 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 Coordinateof the Annotation.Note
ForSCIAnnotationCoordinateMode.SCIAnnotationCoordinateMode_Absolute, this must be adata-valueon 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
ISCIAnnotationinstance 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
Surfaceto place the annotation on. The default isSCIAnnotationSurfaceEnum.SCIAnnotationSurface_AboveChart.Declaration
Objective-C
@property (nonatomic) SCIAnnotationSurfaceEnum annotationSurface;Swift
var annotationSurface: SCIAnnotationSurfaceEnum { get set } -
Defines the
SCIDirection2Dwith the Drag direction for this annotation.Declaration
Objective-C
@property (nonatomic) SCIDirection2D dragDirections;Swift
var dragDirections: SCIDirection2D { get set } -
Defines the
SCIDirection2Dwith 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
Parameters
xAxisThe
X-Axisinstance.yAxisThe
Y-Axisinstance. -
Shows annotation which being hidden by
-hidemethod.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) -> BoolParameters
coordinatesThe annotation coordinates.
boundsThe 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
pointThe new x-y coordinate of base point in pixels.
indexThe 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
xDeltaThe horizontal offset in pixels.
yDeltaThe vertical offset in pixels.
-
Draws this
ISCIAnnotationinstance below chart series.Declaration
Objective-C
- (void) onDrawBelowSurfaceWithContext:(nonnull id<ISCIRenderContext2D>)renderContext assetManager:(nonnull id<ISCIAssetManager2D>)assetManager;Swift
func onDrawBelowSurface(with renderContext: any ISCIRenderContext2D, assetManager: any ISCIAssetManager2D)Parameters
renderContextThe render context instance to draw on.
assetManagerThe asset manager associated with render context.
-
Draws this
ISCIAnnotationinstance above chart series.Declaration
Objective-C
- (void) onDrawAboveSurfaceWithContext:(nonnull id<ISCIRenderContext2D>)renderContext assetManager:(nonnull id<ISCIAssetManager2D>)assetManager;Swift
func onDrawAboveSurface(with renderContext: any ISCIRenderContext2D, assetManager: any ISCIAssetManager2D)Parameters
renderContextThe render context instance to draw on.
assetManagerThe asset manager associated with render context.
-
Draws this
ISCIAnnotationinstance above chart series.Declaration
Objective-C
- (void)onDrawAboveGridWithContext: (nonnull id<ISCIRenderContext2D>)renderContext assetManager:(nonnull id<ISCIAssetManager2D>)assetManager;Swift
func onDrawAboveGrid(with renderContext: any ISCIRenderContext2D, assetManager: any ISCIAssetManager2D)Parameters
renderContextThe render context instance to draw on.
assetManagerThe asset manager associated with render context.
-
Draws this
ISCIAnnotationinstance on one appropriate axis.Declaration
Objective-C
- (void)onDrawOnAxisWithContext:(nonnull id<ISCIRenderContext2D>)renderContext assetManager:(nonnull id<ISCIAssetManager2D>)assetManager;Swift
func onDrawOnAxis(with renderContext: any ISCIRenderContext2D, assetManager: any ISCIAssetManager2D)Parameters
renderContextThe render context instance to draw on.
assetManagerThe asset manager associated with render context.
-
Tries to select this
ISCIAnnotationinstance.Declaration
Objective-C
- (BOOL)onTrySelectAnnotation;Swift
func onTrySelect() -> BoolReturn Value
YES - if selection is successful.
-
Defines the
ISCIAnnotationDragListenerwhich is called when drag event occurs on this annotation.Declaration
Objective-C
@property (nonatomic, strong, nullable) id<ISCIAnnotationDragListener> annotationDragListener;Swift
var annotationDragListener: (any ISCIAnnotationDragListener)? { get set } -
Sets the listener which is called when
isSelectedproperty changes.Declaration
Objective-C
@property (nonatomic, strong, nullable) SCIAnnotationSelectionChangedListener annotationSelectionChangedListener;Swift
var annotationSelectionChangedListener: SCIAnnotationSelectionChangedListener? { get set } -
Sets the listener which is called when
isHiddenproperty changes.Declaration
Objective-C
@property (nonatomic, strong, nullable) SCIAnnotationIsHiddenChangedListener annotationIsHiddenChangedListener;Swift
var annotationIsHiddenChangedListener: SCIAnnotationIsHiddenChangedListener? { get set } -
Defines the block to get notification about changes in LayoutManager.
Declaration
Objective-C
@property (nonatomic, strong, nullable) SCIAxisAlignmentChangedListener axisAlignmentChangedListener;Swift
var axisAlignmentChangedListener: SCIAxisAlignmentChangedListener? { get set }
View on GitHub