Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.
neuronet.io edited this page Nov 26, 2018 · 18 revisions

Task

Tasks are array of simple objects with some properties.

Every task object should contain this properties:

  • id {string|int} - gantt-elastic will track changes in task array by this value
  • label {string} - label which will be displayed inside chart or task list
  • start {string|int|Date} - start property could be date string (ISO 8601) '2018-10-04T21:00:00', milisecond timestamp (int) or Date
  • duration {int} - how long will take to finish task in second - for one day = 246060
  • progress {float|int} - value from 0 to 100 (percent)
  • type {string} - project, milestone or task
  • style {object} - optional, you can look at CSS page of this wiki and grab some styles

Change detection

You can modify task just by changing your input tasks object - gantt-elastic will watch this object and update accordingly.

If you need add task after initialization - just use tasks.push({/* your task data */}) where tasks is your initial array - gantt-elastic will watch this array to.

If you need remove task during execution use tasks = tasks.filter(...) method.

Full array change detection documentation go to change detection

Clone this wiki locally