forces the Gantt chart to automatically change its size to show all tasks without scrolling

boolean| string autosize;


  • "y" ( or true),"x", "xy"
  • Example

    gantt.config.autosize = "xy";

    Default value:


    The 'autosize' config defines whether the gantt will fit data inside the sizes of container where it's initialized showing inner scrollbars, or modify the sizes of container in order to show all data without inner scrolls:

    In case gantt should fit a certain area on a page, the size of gantt container must be managed manually:

    • autosizing should be disabled
    • width/height of a div should be calculated either by html layout if some ready solution for responsive layouts is used, or manually by code.
    See also
    Back to top