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

Different color array for each series donut chart

1 Answer 1067 Views
Charts
This is a migrated thread and some comments may be shown as answers.
IT Purchasing
Top achievements
Rank 1
IT Purchasing asked on 14 Jan 2014, 07:45 PM
I have been looking through the forums and the docs, but can't find a way to have separate arrays of colors for each series.  I know how to specify the color array using seriesColors, but not at each series level.  I want my donut chart with two series to have 2 different color schemes without using colors from the data, i.e. series.colorField

For example:  http://demos.kendoui.com/dataviz/donut-charts/index.html   I want the inner circle to have one set of colors, and the outer circle to have another.  I want to do this via JS/HTML, not from the data source.    Something like:

"seriesColorsOne": [
            "#428bca",
            "#014478",
            "#a8d166"]

"seriesColorsTwo": [
            "#ED9C28",
            "#d9534f",
            "#363636"]

I am sure I am just overlooking something.

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 15 Jan 2014, 01:17 PM
Hello,

Your scenario is not supported out-of-the-box by Kendo UI Donut Chart. As workarounds I can suggest the following:
  • Define separate colors through the color option (like in this online demo);
  • Implement custom JavaScript logic to pass the colors through the series.options and refresh the chart.
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
IT Purchasing
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or