i want to change the colour dynamically.

I'm working on adding various colors to chart diagrams in Mendix. However, when I create a color bar object, it ends up applying the same color to the entire chart. I want to assign different colors to each individual object within the chart. Is there a way to achieve this in Mendix?   and i used the anychart widget and iam expecting my bar chart like following image
2 answers

Hi Rutuja,

To add colors for each bar in the AnyChart widget in Mendix, you can follow these steps:

Create Your JSON Structure:

In your microflow, create a JSON structure that represents your data.

Add the following code snippet to your JSON structure to specify colors for individual bars:


    color: ['#284cba', '#058898', '#f97126'] 


Your code should look like this,




yes it is. If you want to achieve that with the Mendix column chart you can set for each series the color in the "Appearance" tab of that series (see Screenshots attached). You can either hard code the color or use an attribute of the object that you're displaying. 


In case of the any chart widget, it would recommended to follow the doc.

Bildschirmfoto 2024-05-24 um 11.45.03.png

Bildschirmfoto 2024-05-24 um 11.51.28.png