updates multiple tasks/links at once

void batchUpdate(function callback, [boolean noRedraw] );
callbackfunctionthe callback function
noRedrawbooleanoptional, specifies if Gantt should repaint the chart after the callback function; true - not to repaint and false (by default) - to repaint


gantt.batchUpdate(function () {
    var tasks = gantt.getTaskByTime();
    for(var i = 0; i < tasks.length; i++){
        var task = tasks[i];
        task.start_date =, 1, "day");
        task.end_date = gantt.calculateEndDate(task.start_date, task.duration);

Related samples


You can use this method to update multiple tasks/links at once with a single re-rendering instead of making multiple updates with multiple re-renderings.

See also
Back to top