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

Chart Series Colors Limitations

1 Answer 123 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 25 Jul 2013, 03:05 PM
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: http://jsfiddle.net/sakers85/hn6nZ/ 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.

Thanks,
Sean

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 26 Jul 2013, 09:02 AM
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
series[0].color="red"
//refresh the chart
chart.refresh();
  Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Charts
Asked by
Sean
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or