Link Properties

On this page you'll find the full list of properties that the link object may include.

The full list of properties of the task object is given in the Task Properties article.

Required properties

id string | number the link id
source string | number the id of a task that the dependency will start from
target string | number the id of a task that the dependency will end with.
type string the dependency type. The available values are stored in the links object. By default, they are:
  • "0" - 'finish_to_start'.
  • "1" - 'start_to_start'.
  • "2" - 'finish_to_finish'.
  • "3" - 'start_to_finish'.

If you want to store the dependency types in some way other than the default values('0','1','2'), you may change values of the related properties of the links object. For example:

gantt.config.links.start_to_start = "start2start";

Note, these values affect only the way the dependency type is stored, not the behaviour of visualization.

Optional properties

lag number the task's lag
readonly boolean can mark link as readonly
editable boolean can mark link as editable


var data = {
    tasks: [
        {id:1, text:"Project #1", start_date:"01-04-2020", duration:18},
        {id:2, text:"Task #1", start_date:"02-04-2020", duration:8, parent:1},
        {id:3, text:"Task #2", start_date:"11-04-2020", duration:8, parent:1}
        {id:1, source:1, target:2, type:"1"},
        {id:2, source:2, target:3, type:"0"}
Back to top