Methods
Core Methods
render ()
Renders the chart and initializes all components.
apexGantt.render();
update (newOptions)
Updates the entire Gantt chart with new configuration and task data.
apexGantt.update({
series: [
{
id: 'task-1',
name: 'Design Phase',
start: '2025-07-01',
end: '2025-07-10',
progress: 40
},
// more tasks...
],
pixelsPerDay: 25.7,
});
Task Methods
updateTask (taskId, taskData)
Updates the specific task with provided task data.
apexGantt.updateTask('task-1', {
name: 'Design Phase',
start: '2025-07-01',
end: '2025-07-10',
progress: 40
});
Zoom Methods
zoomIn()
Increases pixelsPerDay to zoom the timeline in. The header tier (year → quarter → month → week → day → halfday → hour → minute) is auto-picked from the new density.
apexGantt.zoomIn();
zoomOut()
Decreases pixelsPerDay to zoom the timeline out. The header tier (minute → hour → halfday → day → week → month → quarter → year) is auto-picked from the new density.
apexGantt.zoomOut();