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

Legend color repeated after five item

4 Answers 107 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 27 Jun 2013, 05:37 AM
Dears,

I am having problem with Legend when I have item (series) more than 5 then it will repeat from the first color. I am using the multi series which generated dynamically so I can't set the specific color each series.

Example:
series1: Red
series2: Blue
......
series6: Red


it makes the chart messy and can't be understood as the color are same.

I appreciate your comments and advice. Thanks.

4 Answers, 1 is accepted

Sort by
0
Stamo Gochev
Telerik team
answered on 01 Jul 2013, 02:09 PM
Hello Tony,

Thank you for contacting the Telerik's support team.

The reason for this behavior is because the RadHtmlChart uses 5 predefined colors for the series, i.e. if you use more than 5 series in a single chart, their colors will start to repeat themselves. However, we have worked on adding 5 more colors for each skin and this improvement will be available in our next Service Pack. If you are too eager to get them, you can find the new colors in our Latest Internal Build.

Regards,
Stamo Gochev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Tony
Top achievements
Rank 1
answered on 02 Jul 2013, 04:01 PM
Dear,

I got  your meanings that it provides only 5 pre-defined colors. It would be great if you could provide an unlimited color, not just 10 or 15 color such what MS excel does. Actually, I can do it by grammatically generate now.

Thanks for your answer though. 
0
Ryan
Top achievements
Rank 1
answered on 25 Jan 2019, 10:57 PM

This is quite frustrating to only have 10 colors, and frankly many of the 10 are similar. See my attached example. It's very difficult for a user to make any sense of this graph. I realize that you are using a palette of colors that you have decided looks good with the current skin. However, when it comes to graphs, I think it's more important to have the full spectrum of colors available (without lots of custom coding), rather than being limited to colors that match the current skin. Couldn't you have some better options to override the default 10 colors and have your graph pick a wider variety of colors? This is one of the biggest complains from our customers and makes me want to use a graphing component from some other vendor.

0
Marin Bratanov
Telerik team
answered on 28 Jan 2019, 02:17 PM
Hi Ryan,

You can easily define a set of colors you wish to use and assign them to the series you have, and the following article shows an example: https://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/how-to/using-multiple-custom-colors-to-create-charts.

Alternatively, you can create a custom skin that has the desired list of colors in the seriesColors field which will have just about the same result, but requires a bit more maintenance and is a bit less portable. Here's how to create a custom skin: https://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/appearance-and-styling/create-custom-skin.

For the most cases where a chart is needed on a web page, 10 colors have been enough for our customers. RadHtmlChart is a chart, not a complete reporting solution (like, say, Tableau) and as such it is not designed to handle everything, which is why it offers API for the developer to create the desired results.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Chart (HTML5)
Asked by
Tony
Top achievements
Rank 1
Answers by
Stamo Gochev
Telerik team
Tony
Top achievements
Rank 1
Ryan
Top achievements
Rank 1
Marin Bratanov
Telerik team
Share this question
or