Can I change the style of points in a series?

Hi, I'm trying to let points of a series have different style and shape, for example, if I have a line series, I want the first dot to be displayed as a blue circle, second to be a red square, third to be a yellow triangle, etc...

Am I able to do that?


2 Replies

VK Vijayabharathi K Syncfusion Team February 14, 2011 06:56 AM UTC

Hi Youfei Chen,

Yes. We are able to set the styles and shape to series points by styles properties of series. Kindly find the code snippet below to achieve this,

[C#]

//For 1st point
this.chartControl1.Series[0].Styles[0].Symbol.Shape = ChartSymbolShape.Circle;
this.chartControl1.Series[0].Styles[0].Symbol.Color = Color.Blue;
//For 2nd point
this.chartControl1.Series[0].Styles[1].Symbol.Shape = ChartSymbolShape.Square;
this.chartControl1.Series[0].Styles[1].Symbol.Color = Color.Red;
//For 3rd point
this.chartControl1.Series[0].Styles[2].Symbol.Shape = ChartSymbolShape.Diamond;
this.chartControl1.Series[0].Styles[2].Symbol.Color = Color.Yellow;

Regards,
Vijayabharathi K




YC Youfei Chen February 17, 2011 05:30 PM UTC

That works!

Thanks!


Loader.
Up arrow icon