The tasks.list property stores the Gantt Chart task data.
DayPilot.Gantt.tasks.list (array)
You can use this array to access the current task tree (including the node state) and load the tasks in bulk.
For the array item structure description see DayPilot.Task.data.
It is necessary to call init() (during initialization) or update() after changing the task list.
Initialization
<div id="gantt-div"></div>
<script>
// create DayPilot.Gantt object, bind it to the placeholder div
const gantt = DayPilot.Gantt("gantt-div");
// configure
gantt.tasks.list = [
{
start: "2015-10-01",
end: "2015-10-03",
id: 1,
text: "Task 1",
tags: {
info: "info text"
}
}
];
// initialize and render the Gantt chart
gantt.init();
</script>
Update
<script>
// ...
gantt.tasks.list = [
{
start: "2015-10-01",
end: "2015-10-03",
id: 1,
text: "Task 1",
tags: {
info: "info text"
}
}
];
gantt.update();
</script>