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

Chart Series Color Limitations

1 Answer 120 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:43 PM
Good Morning,

I appear to be running into a 6 color limitation for series.  The following jsFiddle highlights the issue: http://jsfiddle.net/sakers85/hn6nZ/

As you can see the Size "X" has duplicate colors for Grade CUL and WXB.  The same is true for Size "150" which has duplicate colors for Grade PRO and WXF.

Is my only option to explicitly set the seriesColors property with more colors than needed?  This could be an issue as the datasource is remote and can change at any given time based upon the request.

Please advise on the best course of action.  Thanks,
Sean

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 26 Jul 2013, 09:05 AM
Hi Sean,

I have already answered to the same question in you other thread, however I am pasting my reply here too:

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 theoptions, however keep in mind you should refresh() the chart. I.e.:Copy Code

//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