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

Working with LineSeries colors

1 Answer 131 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ravi
Top achievements
Rank 1
Ravi asked on 26 May 2016, 03:39 PM

Hi,

How can I dynamically (with C# code) associate the same color to the LineSeries Name (along with the X Axis), and the actual chart line in the SeriesItems?

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 27 May 2016, 08:31 AM

Hello,

The 10 build-in series colors for each Skin, together with colors for the axes, labels and other elements have been chosen by our designers. They are not chosen automatically (or through some algorithm) by the chart widget itself. Essentially, they are defined in Kendo themes that we use.

Thus, you can define the colors of your series and your axes through their properties if you do not like the default ones.

You can see this behavior and that axes colors are independent from series colors in the following article that explains how to use multiple y-axes: http://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/functionality/axes/multiple-y-axes. The same settings are available for the X-axis as well: http://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/server-side-programming/axes-configuration#attribute-properties-in-the-axis-tag.

Alternatively, you can try another skin (e.g., Black) to see if you like its built-in color combinations better.

If this is not what you are looking for, could you explain your needs and requirements in more detail so I can get a better understanding of what you are trying to achieve?

If you would like to see some form of automatic mapping between series colors and axes colors, I suggest you post your idea in our Feedback portal (https://admin.telerik.com/feedback.telerik.com/project/108) together with a detailed description of how you expect it to work, especially in cases when there are multiple series per axis. This will let the community show their support and comments for it and if the concept gets popular, its implementation will be considered.

 

 

Regards,

 

Marin Bratanov
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
General Discussions
Asked by
Ravi
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or