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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Line chart - Change color of the line chart

Thread ID:





141795 Jan 4,2019 12:19 PM UTC Jan 7,2019 05:21 AM UTC WinForms 2
Tags: Chart
senthil kumar
Asked On January 4, 2019 12:19 PM UTC

Hi Team
I have looked at the help, searched for it, but cant find a method which can explicitly change the color of the Line chart. In fact I have 2-5 lines to be drawn on the same chart and the automatically assigned colors seem to be not different from each other. Hence I would like to set the color of the lines for different series manually.

series.Style.Border.Color = Color.Red ' - Color is NOT changing
series.Style.Border.Width = 2 ' - Width of the line changes !
How can one achieve this?

Attachment: chart_eb075350.rar

senthil kumar
Replied On January 5, 2019 09:59 AM UTC

  Me.sfChart.Series(1).Style.Interior = New Syncfusion.Drawing.BrushInfo(Syncfusion.Drawing.PatternStyle.None, System.Drawing.Color.Red, System.Drawing.Color.Green)

The above code changes the line color. Found it via a search in KB.

Muneesh Kumar G [Syncfusion]
Replied On January 7, 2019 05:21 AM UTC

Hi Senthil, 
Glad that the requirement has been achieved and please get back to us if you need any other assistance.  
Muneesh Kumar G. 


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

This page will automatically be redirected to the 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

Live Chat Icon For mobile
Live Chat Icon