Articles in this section
Category / Section

How to change the data marker symbol type in SfChart

1 min read

                SFChart provides support to change the datamarker symbol type. It is used to adorn the datapoint. The markerType is an enum property in datamarker, used to change the various symbol types like diamond, triangle, circle, etc,. To show the datamarker symbol, we must set the showMarker property as true. By default it is false.

The following code illustrates how to use the markerType property.

Objective-C

SFLineSeries *series = [[SFLineSeries alloc]init];
series.dataMarker.showLabel = false;
series.dataMarker.showMarker = true;
series.dataMarker.markerType = SFChartDataMarkerTypeDiamond;
series.dataMarker.markerColor = [UIColor redColor];
return series;

 

Swift

var series : SFLineSeries     = SFLineSeries();
series.dataMarker.showLabel = false;
series.dataMarker.showMarker = true;
series.dataMarker.markerType = SFChartDataMarkerType.Diamond;
series.dataMarker.markerColor = UIColor.redColor();
return series;

 

Xamarin.iOS (C#)

SFLineSeries series = new SFLineSeries ();series.DataMarker.ShowLabel = false;series.DataMarker.ShowMarker = true;series.DataMarker.MarkerType = SFChartDataMarkerType.Diamond;series.DataMarker.MarkerColor = UIColor.Red;return series;

 

F:\Datamarker.png

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied