This is a migrated thread and some comments may be shown as answers.

Line Chart with different colors in single line.

2 Answers 375 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Ganesh
Top achievements
Rank 2
Ganesh asked on 17 Dec 2012, 08:28 AM
Is there any way to draw a line chart with different colors in a single series.

from point to point change the colors based on conditions


I need line chart  as like below attached image.


2 Answers, 1 is accepted

Sort by
0
Hristo Germanov
Telerik team
answered on 17 Dec 2012, 08:48 AM
Hello Ganesh,

This is not supported by the line chart but you can add multiple line series with different colors.

Greetings,
Hristo Germanov
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tanvi
Top achievements
Rank 1
commented on 30 Oct 2023, 06:43 PM

Hi @Hristo Germanov, I am trying to add 2nd line in my graph but not able to add it. Can you please guide me for the same?
Neli
Telerik team
commented on 01 Nov 2023, 08:30 AM

Hii Tanvi,

I am not sure about the exact scenario on your side, but linked here you will find a small example where multiple series are used with different colors - https://dojo.telerik.com/@NeliKondova/uvuYaTEJ

I hope you will find the provided example helpful. 

Regards,

Neli

0
Adil
Top achievements
Rank 1
Iron
Veteran
Iron
answered on 01 Dec 2022, 01:10 PM

Do you still have not solution about this? Because i'm searching exactly same thing as in question

 

Thanks

Nikolay
Telerik team
commented on 05 Dec 2022, 07:52 AM

Hi Adil,

This, I am afraid, is still not possible with the current Line Chart API. A line from the same series cannot have two different colors, but a line made of two different series can.

To end up with the look you're looking for, switch to the scatterLine series and separate the data into two series. Please refer to the following Dojo demo I prepared:

Additionally, the series.color configuration changes only the colors of the points based on the Data.

Finally, if you think this feature is important for you feel free to submit a feature request in the Feedback portal.

Regards,

Nikolay

 

Tags
Charts
Asked by
Ganesh
Top achievements
Rank 2
Answers by
Hristo Germanov
Telerik team
Adil
Top achievements
Rank 1
Iron
Veteran
Iron
Share this question
or