The tasks.list property (array) stores the Gantt Chart task data.
DayPilot.Gantt.tasks.listYou can use this array to access the current task tree, including the node state, and load tasks in bulk.
For the array item structure, see DayPilot.Task.data.
Call DayPilot.Gantt.init() during initialization or DayPilot.Gantt.update() after changing the task list.
JavaScript
Initialization
// HTML: <div id="dp"></div>
const gantt = new DayPilot.Gantt("dp", {
tasks: [
{
start: "2015-10-01",
end: "2015-10-03",
id: 1,
text: "Task 1",
tags: {
info: "info text"
}
}
],
// ...
});
gantt.init();Update
gantt.tasks.list = [
{
start: "2015-10-01",
end: "2015-10-03",
id: 1,
text: "Task 1",
tags: {
info: "info text"
}
}
];
gantt.update();Angular
<daypilot-gantt [config]="config"></daypilot-gantt>config: DayPilot.GanttConfig = {
tasks: [
{
start: "2015-10-01",
end: "2015-10-03",
id: 1,
text: "Task 1",
tags: {
info: "info text"
}
}
],
// ...
};React
const tasks = [
{
start: "2015-10-01",
end: "2015-10-03",
id: 1,
text: "Task 1",
tags: {
info: "info text"
}
}
];<DayPilotGantt
tasks={tasks}
{/* ... */}
/>Vue
const tasks = [
{
start: "2015-10-01",
end: "2015-10-03",
id: 1,
text: "Task 1",
tags: {
info: "info text"
}
}
];<DayPilotGantt
:tasks="tasks"
<!-- ... -->
/>