DayPilot.Gantt.tasks.list

The tasks.list property stores the Gantt Chart task data.

Declaration

DayPilot.Gantt.tasks.list (array)

Description

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.

Example

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>