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

Line chart - Change color of the line chart

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

2 Replies

SK senthil kumar 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.


MK Muneesh Kumar G Syncfusion Team 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.  
  
Thanks, 
Muneesh Kumar G. 


Loader.
Live Chat Icon For mobile
Up arrow icon