Working with LineSeries colors

2 posts, 0 answers
  1. Ravi
    Ravi avatar
    5 posts
    Member since:
    May 2016

    Posted 26 May Link to this post

    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?

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 27 May Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top