Change xaxis minimum and maximum using script

Hi, i need to set the minimum and maximum of an axes using a parameter that comes from data.


and to change the title via script:

i tried with this code in a button:

chart1.control.xAxes[0].minimum=-100;
chart1.control.xAxes[0].title = “ciao”;
chart1.control.invalidate();

but the scale never change an the title is not displayed on the correct axes.

what am I doing wrong?
Thanks for your help

Hi @gianbattista.schieppati,

You can change the value of your axis by doing something like this:

chart1.control.yAxes[0].maximum = 400000;

I think the problem in your case is that you’ve switched the axis, try changing the y-axis.