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

Change Line color with Condition

Thread ID:

Created:

Updated:

Platform:

Replies:

124948 Jul 10,2016 07:42 AM UTC Jul 13,2016 07:10 PM UTC Xamarin.Android 3
loading
Tags: SfChart
Albert K
Asked On July 10, 2016 07:42 AM UTC

Hi,

I want to ask if it is possible to change the line color of a line/spline chart when it hit a high or low value?    For example, my data ranges average from numeric value between 50 and 120.  So for value of below 50, I would like the line color to be orange and for value above 120 the line color is red.

Thank you. 

Yuvaraj Palanisamy [Syncfusion]
Replied On July 11, 2016 06:10 PM UTC

Hi Albert, 

 

Thanks for contacting Syncfusion products. 

 

We have prepared a sample for your requirement by overriding the onDraw() method of line segment. Please find the attached sample from the below location. 

  

Sample: http://www.syncfusion.com/downloads/support/directtrac/159916/ze/LineSeries_Gradient1147242272  

  

Thanks, 

Yuvaraj 

Albert K
Replied On July 12, 2016 07:59 AM UTC

Hi Albert, 

 

Thanks for contacting Syncfusion products. 

 

We have prepared a sample for your requirement by overriding the onDraw() method of line segment. Please find the attached sample from the below location. 

  

Sample: http://www.syncfusion.com/downloads/support/directtrac/159916/ze/LineSeries_Gradient1147242272  

  

Thanks, 

Yuvaraj 

Hi,


Thanks for the sample code.  The line color came out but the spline graph now looks like a line (no more smooth curve).  How do I achieve that?  Thank you.   

Yuvaraj Palanisamy [Syncfusion]
Replied On July 13, 2016 07:10 PM UTC

Hi Albert,
 
Thanks for contacting Syncfusion support.
 
We have modified the sample as per your requirement with Spline series. Please check the modified sample and let us know if you have any clarifications.
 
Sample: http://www.syncfusion.com/downloads/support/forum/124948/ze/SplineSeries_Gradient1684261936 
 
Thanks,
Yuvaraj


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

;