DevExtreme v24.2 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

React Charts - Color Each Bar Differently

The Chart assigns one color to one series. To color bars differently, create a separate series for each bar.

Assign the age field to the argumentField property of the commonSeriesSettings object to specify a common argument for the series. Then specify the valueField property.

Choose a data field and assign it to the seriesTemplate.nameField property. Each value from this data field generates a separate series.

To learn more about this type of data binding, refer to the following demo: Dynamic Series from the DataSource.

To give you the ability to edit code on the fly, the demo uses SystemJS. For this reason, launching the demo takes some time. We strongly recommend that you do not use this approach in real projects.
Backend API