# Set different colors in Chart for ChartSeriesItem based on category value

## Environment

<table>
    <tbody>
	    <tr>
	    	<td>Product Version</td>
	    	<td>5.12.0</td>
	    </tr>
	    <tr>
	    	<td>Product</td>
	    	<td>Progress® KendoReact Chart</td>
	    </tr>
    </tbody>
</table>

## Description

I want to have different colors per category value for the ChartSeriesItem

## Solution

The color property of the ChartSeriesItem accepts function where the dataItem is accessible. Using the category value we can create a random color per each category (or use predefined colors) and store it in an array or an object, so it can be re-used for other items with the same category.

This is an example showcasing how to limit the value:

[Demo Source](https://demos.telerik.com/kendo-react-ui/knowledge-base/charts/chart-color-by-category/source.txt)
