Chart Series Colors Limitations

2 posts, 0 answers
  1. Sean
    Sean avatar
    10 posts
    Member since:
    Jan 2009

    Posted 25 Jul 2013 Link to this post

    Good Morning,

    I seem to be running into a color limit of 6 colors for series before the colors start repeating using default styles and settings.  Please take a look at this jsFiddle: which shows the undesired results.  As you can see for instance the "X" size has two series (CUL and WXB) with the same color.  The same is true for the "150" size with PRO and WXF.

    Is my only option to use the seriesColors and explicitily tell the chart which colors to use?  This could be a potential issue as I may or may not know how many Grades come back from the server at any given refresh.  Please advise.

  2. Iliana Nikolova
    Iliana Nikolova avatar
    2622 posts

    Posted 26 Jul 2013 Link to this post

    Hi Sean,

    The observed issue is due to by default are defined only six colors for the Chart series. As another approach for your scenario (except using the seriesColors option) I can suggest you setting colors via the options, however keep in mind you should refresh() the chart. I.e.:

    //get reference to the chart widget
    var chart = $("#chart").data("kendoChart");
    //get chart series
    var series = chart.options.series;
    //set color to the first series
    //refresh the chart
    Iliana Nikolova
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top