Rerender gantt chart on config change

How can I rerender gantt chart with the new config values when any of the config value is changed? Currently I’m changing autosize property on a button click but the changes are not reflecting on the gantt chart.

Hello Akhil,
For some settings it is enough to use the gantt.render method:
Other settings require Gantt or layout reinitialization. For them, you need to use the gantt.init or gantt.resetLayout methods:

For the autosize config, it is enough to use the gantt.render() method. However, after you change the parameter, Gantt will modify its container size:

When you turn off autosize settings, the container size doesn’t change, so you won’t see the changes. You need to manually reset the width and height properties.
Here is an example of how it might be implemented: