manju_m
Posts: 6
Joined: Fri Mar 08, 2024 2:22 pm

Gantt XAxis min max

I would like to dynamically set xAxis min and max. If I set it in the options like shown below it works

xAxis: {
min: my_Computed_Min,
max: my_Computed_Max
}

However, it is changing the display of the chart and zooming in. It is not using the default range selector "All". Is there a particular event I should be using to set these?


Please advise.
bastss
Site Moderator
Posts: 1317
Joined: Wed Oct 17, 2018 10:59 am

Re: Gantt XAxis min max

Hello,

Thank you for contacting us!

I am not sure if I understood your requirements well, but I think that you can set the rangeSelector.selected to particular number matching the "All" options. API: https://api.highcharts.com/gantt/rangeSelector.selected

Demo: https://jsfiddle.net/BlackLabel/9e1zf86n/

Kind regards!
Sebastian Wędzel,
Highcharts Developer
manju_m
Posts: 6
Joined: Fri Mar 08, 2024 2:22 pm

Re: Gantt XAxis min max

Thank you for your response. The question was related to setting the min and max via variables. However, the issue is resolved. The incorrect chart display was related to the timing of the data load. Thanks again for taking the time to respond to my query.

Return to “Highcharts Gantt”