iOS Charting Documentation - SciChart
PointMarker API

SciChart features a rich PointMarkers API to annotate the data-points of certain series with markers, e.g. Ellipse, Square, Triangle or Cross marker. The following sections detail how to add PointMarkers to your SciChart charting application from a visual perspective.

EllipsePointMarker

To add an EllipsePointMarker to a RenderableSeries, use the following syntax. This will cause a 15-pixel diameter circle to be rendered at each data-point on the parent FastLineRenderableSeries. Note that Stroke and Fill may be Transparent if desired.

Objective C:

Declaring an EllipsePointmarker Instance
Copy Code
SCIEllipsePointMarker *pointMarker1 = [[SCIEllipsePointMarker alloc]init];
[pointMarker1 setWidth:15];
[pointMarker1 setHeight:15];
[pointMarker1 setFillStyle:[[SCISolidBrushStyle alloc]initWithColorCode:0x990077ff]];
[pointMarker1 setStrokeStyle: [[SCISolidPenStyle alloc]initWithColorCode:0xFFADD8E6 withThickness:2.0]];

Swift:

Declaring an EllipsePointmarker Instance
Copy Code
let pointMarker1:SCIEllipsePointMarker = SCIEllipsePointMarker()
pointMarker1.width = 15
pointMarker1.height = 15
pointMarker1.fillStyle = SCISolidBrushStyle.init(colorCode: 0x990077ff);
pointMarker1.strokeStyle = SCISolidPenStyle.init(colorCode:0xFFADD8E6, withThickness:2.0);

TrianglePointMarker

To add a TrianglePointMarker to a RenderableSeries, use the following syntax. This will cause a 20-pixel sized triangle to be rendered at each data-point on the parent FastLineRenderableSeries. Note that Stroke and Fill may be Transparent if desired.

Objective C:

Declaring an TrianglePointMarker Instance
Copy Code
SCITrianglePointMarker *pointMarker3 = [[SCITrianglePointMarker alloc]init];
[pointMarker3 setWidth:20];
[pointMarker3 setHeight:20];
[pointMarker3 setFillStyle:[[SCISolidBrushStyle alloc]initWithColorCode:0xFFFFDD00]];
[pointMarker3 setStrokeStyle:[[SCISolidPenStyle alloc]initWithColorCode:0xFFFF6600 withThickness:2.0]];

Swift:

Declaring an TrianglePointMarker Instance
Copy Code
let pointMarker3:SCITrianglePointMarker = SCITrianglePointMarker()
pointMarker3.width = 20
pointMarker3.height = 20
pointMarker3.fillStyle = SCISolidBrushStyle.init(colorCode: 0xFFFFDD00);
pointMarker3.strokeStyle = SCISolidPenStyle.init(colorCode:0xFFFF6600, withThickness:2.0);

CrossPointMarker


To add a CrossPointMarker to a RenderableSeries, use the following syntax. This will cause a 25-pixel sized cross to be rendered at each data-point on the parent FastLineRenderableSeries. Note that Stroke and Fill may be Transparent if desired.

Objective C:

Declaring an CrossPointMarker Instance
Copy Code
SCICrossPointMarker *pointMarker4 = [[SCICrossPointMarker alloc]init];
[pointMarker4 setWidth:25];
[pointMarker4 setHeight:25];
[pointMarker4 setStrokeStyle:[[SCISolidPenStyle alloc]initWithColorCode:0xFFFF00FF withThickness:4.0]];

Swift:

Declaring an CrossPointMarker Instance
Copy Code
let pointMarker4:SCICrossPointMarker = SCICrossPointMarker()
pointMarker4.width = 25
pointMarker4.height = 25
pointMarker4.strokeStyle = SCISolidPenStyle.init(colorCode:0xFFFF00FF, withThickness:4.0);

SquarePointMarker

 

 

 

 

 

To add a Square point-marker to a RenderableSeries, use the following syntax. This will cause a 5-pixel sized box to be rendered at each data-point on the parent FastLineRenderableSeries. Note that Stroke and Fill may be Transparent if desired.

Objective C:

Declaring an SquarePointMarker Instance
Copy Code
SCISquarePointMarker *pointMarker2 = [[SCISquarePointMarker alloc]init];
[pointMarker2 setWidth:20];
[pointMarker2 setHeight:20];
[pointMarker2 setFillStyle:[[SCISolidBrushStyle alloc]initWithColorCode:0x99ff0000]];
[pointMarker2 setStrokeStyle:[[SCISolidPenStyle alloc]initWithColorCode:0xFFFF0000 withThickness:2.0]];);

Swift:

Declaring an SquarePointMarker Instance
Copy Code
let pointMarker2:SCISquarePointMarker = SCISquarePointMarker()
pointMarker2.width = 15
pointMarker2.height = 15
pointMarker2.fillStyle = SCISolidBrushStyle.init(colorCode: 0x99ff0000);
pointMarker2.strokeStyle = SCISolidPenStyle.init(colorCode:0xFFFF0000, withThickness:2.0);

SpritePointMarker

 

 

 

 

 

To add a Sprite point-marker to a RenderableSeries, use the following syntax. This will cause a 40-pixel sized image to be rendered at each data-point on the parent FastLineRenderableSeries.

Objective C:

Declaring an SpritePointMarker Instance
Copy Code
SCISpritePointMarker *pointMarker5 = [[SCISpritePointMarker alloc]init];
[pointMarker5 setWidth:40];
[pointMarker5 setHeight:40];
[pointMarker5 setTextureBrush:[[SCITextureBrushStyle alloc]initWithTexture:[[SCITextureOpenGL alloc]initWithImage:[UIImage imageNamed:@"Weather_Storm"]]]];

Swift:

Declaring an SpritePointMarker Instance
Copy Code
let pointMarker5:SCISpritePointMarker = SCISpritePointMarker()
pointMarker5.width = 40
pointMarker5.height = 40
pointMarker5.textureBrush = SCITextureBrushStyle.init(texture: SCITextureOpenGL.init(image: UIImage.init(named: "Weather_Storm")))