onScaleAdjusted

fires when the scale is re-rendered in order to display all tasks completely

void onScaleAdjusted(){ ... };

Example

gantt.attachEvent("onScaleAdjusted", function(){
    var min = gantt.getState().min_date,
    max = gantt.getState().max_date,
    to_str = gantt.templates.task_date;
 
    return gantt.message("Scale shows days from " + to_str(min) 
    + " to " + to_str(max));
});

Related samples

Details

Note, the event will fire only if the fit_tasks property is set to true.

See also
Back to top