We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can I change the style of points in a series?

Thread ID:

Created:

Updated:

Platform:

Replies:

98191 Feb 11,2011 10:01 PM UTC Feb 17,2011 05:30 PM UTC WinForms 2
loading
Tags: Chart
Youfei Chen
Asked On February 11, 2011 10:01 PM UTC

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?


Vijayabharathi K [Syncfusion]
Replied On 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



Youfei Chen
Replied On February 17, 2011 05:30 PM UTC

That works!

Thanks!


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;