Hi Horea,
The Custom Layout field in the Mendix Charts widget is a static JSON text area, not an expression editor.
It is evaluated at design time, not runtime, so you can't change the labels dynamically.
I don't think so it'a a syntax problem, it's an architectural limitation of the widget.
But there is a workaround that I just found in plotly documentation.
You can add a html snippet on the page which will be triigger a js snippet funtion after the rendering completion of your chart .
there you can trigger a plotly.reloyout function like this.
// update only values within nested objects
var update = {
title: {text: 'some new title'}, // updates the title
'xaxis.range': [0, 5], // updates the xaxis range
'yaxis.range[1]': 15 // updates the end of the yaxis range
};
Plotly.relayout(graphDiv, update)
For more info read this doc: https://plotly.com/javascript/plotlyjs-events/
Please try this
Maybe this works for you 😊