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

Multiple Colors in the same series of a line series chart

1 Answer 186 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Saravanan Thiruchabai
Top achievements
Rank 1
Saravanan Thiruchabai asked on 24 Apr 2013, 02:58 PM
Hi

     I would like to know whether it is possible to have multiple colors in the same series of a line series chart. For example if have 50 datapoints, from data point 1 to data point 10 the line will be of Red Color and from Data point 20 to data point 30 the line will be of Green Color and so on. I know we can have multiple series, but the requirement is to have in the single series with multiple colors. I also know that marker point can be of different colors based on conditions. I appreciate any help.

Thanks & Best Regards
Saran

1 Answer, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 29 Apr 2013, 03:41 PM
Hi Saran,

The LineSeries are rendered as a single line segment inside a Path and that is why it is not possible to set different colors for the different parts of the line series. To achieve your requirement you will need to use multiple line series (as you already mentioned). The point marks of the lines series can have different colors, due to the fact that they are separate visual elements.
 
Regards,
Petar Kirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart
Asked by
Saravanan Thiruchabai
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Share this question
or