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

How to Use Custom Colors in Chart Series

2 Answers 479 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
GokuJim
Top achievements
Rank 1
GokuJim asked on 23 May 2019, 12:48 PM

The current KendoReact documentation for the Chart component lacks documentation of how to use the API for things like using customized assigned colors for the series plot of a chart such as a donut series chart.

Can you provide us with an example of how to use custom colors in a KendoReact Chart Series i.e. for a Donut series chart? I'd like to custom specify the colors for a series i.e. Bad = red, Good = green, Warning = yellow, etc. 

Thanks!

 

Jim Minnihan

SKF Group, Inc.

2 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 27 May 2019, 07:54 AM
Hello, James,

This can be done using the color or the colorField props of the ChartSeriesItem:

https://www.telerik.com/kendo-react-ui/components/charts/api/ChartNavigatorSeriesItemProps/#toc-color

https://www.telerik.com/kendo-react-ui/components/charts/api/ChartNavigatorSeriesItemProps/#toc-colorfield

I made an example using the colorField:

https://stackblitz.com/edit/react-jbdqln?file=app/power-distribution-data.json

I hope this is helpful.

Regards,
Stefan
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
GokuJim
Top achievements
Rank 1
answered on 14 Jun 2019, 01:38 PM

Awesome! Used the basis of your example to make this happen. It works perfectly!

 

Jim

SKF USA, Inc.

Tags
General Discussions
Asked by
GokuJim
Top achievements
Rank 1
Answers by
Stefan
Telerik team
GokuJim
Top achievements
Rank 1
Share this question
or