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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Regarding Line Chart

Thread ID:





74653 Jun 24,2008 07:30 AM UTC Jun 24,2008 09:47 AM UTC WinForms 1
Tags: Chart
Administrator [Syncfusion]
Asked On June 24, 2008 07:30 AM UTC


Is it possible to line chart with Color?I have attached image with it.Please reply me it is urgernt.

Pankaj Sardana


Manohari [Syncfusion]
Replied On June 24, 2008 09:47 AM UTC

Hi Pankaj,

It is possible to display LineChart with different colors using the ChartSeries.Style.Interior property. This property can be set directly using the this.ChartControl1.Series[0].Styles[0].Interior property. And Colors to the Points can also be set using the PrepareStyle event args as shown below.

Sample code:

this.chartControl1.Series[0].PrepareStyle += new ChartPrepareStyleInfoHandler(series_PrepareStyle);
void series_PrepareStyle(object sender, ChartPrepareStyleInfoEventArgs args)
//Specifying different Colors for data points using Prepare style event
ChartSeries series = sender as ChartSeries;
if (series != null)
if (args.Index == 0)
args.Style.Interior = new Syncfusion.Drawing.BrushInfo(Color.Red);
else if (args.Index == 1)
args.Style.Interior = new Syncfusion.Drawing.BrushInfo(Color.Green);
else if (args.Index == 2)

Please refer to the sample attached in the below link which illustrates the same.


Kindly let us know if you have any other queries. Thanks for your patience.



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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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