iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
SCIPolyLineAnnotation
@interface SCIPolyLineAnnotation : SCIAnnotationBase <ISCIPolyLineAnnotation>
A multi-point polygon annotation that draws a filled, stroked closed shape over the chart surface. Supports up to 5 base points.
-
Pen style used to draw the polygon outline.
Declaration
Objective-C
@property (nonatomic, strong, nullable) SCIPenStyle *stroke;Swift
var stroke: SCIPenStyle? { get set } -
Brush with which box annotation is drawn on chart surface.
Declaration
Objective-C
@property (nonatomic, strong, nonnull) SCIBrushStyle *fillBrush;Swift
var fillBrush: SCIBrushStyle { get set } -
Overall opacity applied to the polygon (0.0–1.0). Default: 0.5.
Declaration
Objective-C
@property (nonatomic) CGFloat alpha;Swift
var alpha: CGFloat { get set } -
Arbitrary string identifier for this polygon
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *annotationId;Swift
var annotationId: String? { get set } -
Listener notified when all 5 base points have been placed.
Declaration
Objective-C
@property (nonatomic, weak, nullable) id<ISCIAnnotationCreatedListener> annotationCreatedListener;Swift
weak var annotationCreatedListener: (any ISCIAnnotationCreatedListener)? { get set } -
YES once all 5 base points have been placed and onAnnotationCreated has fired.
Declaration
Objective-C
@property (nonatomic) BOOL isCreated;Swift
var isCreated: Bool { get set } -
Undocumented
Declaration
Objective-C
@property (nonatomic) NSMutableArray *polygonPointsSwift
var polygonPoints: NSMutableArray { get set } -
Updates the stored data-space point at index and redraws.
Declaration
Objective-C
- (void)updateBasePointAtIndex:(NSInteger)index x:(nonnull id<ISCIComparable>)x y:(nonnull id<ISCIComparable>)y;Swift
func updateBasePoint(at index: Int, x: any ISCIComparable, y: any ISCIComparable) -
Returns all stored data-space points as an NSArray of SCIComparablePoint.
Declaration
Objective-C
- (nonnull NSArray<SCIComparablePoint *> *)getBaseDataValues;Swift
func getBaseDataValues() -> [SCIComparablePoint] -
No-op — polygon does not use a category-axis cached-point mechanism.
Declaration
Objective-C
- (void)setCachedBasePoints;Swift
func setCachedBasePoints() -
Updates the pixel-space position of the point at index, then caches the corresponding data value from the current axes.
Declaration
Objective-C
- (void)updateBasePointAtIndex:(NSInteger)index xCoordinate:(CGFloat)xCoord yCoordinate:(CGFloat)yCoord;Swift
func updateBasePoint(at index: Int, xCoordinate xCoord: CGFloat, yCoordinate yCoord: CGFloat)
View on GitHub