Drag and drop link creating is enabled by default (linkCreateHandling="Update").

html5 gantt link creating hover

The linking points are activated on task hover. You can create a new link using drag and drop.

html5 gantt link creating

In addition to the default action specified by linkCreateHandling, two events are fired:

  • onLinkCreate (before the default action)
  • onLinkCreated (after the default action)

You can add a new link using links.add() method.


Drag and drop link creating handler.

gantt.onLinkCreated = function(args) {

Adding a new link using JavaScript

  from: "1",
  to: "2",
  type: "FinishToStart"