DayPilot.Gantt.links.add

Adds a new link to the Gantt chart and updates the view.

Declaration

DayPilot.Gantt.links.add(link);

Parameters

  • link (DayPilot.Link) - a new link to be added

Example

<div id="gantt"></div>

<script>
  var gantt = new DayPilot.Gantt("gantt");

  gantt.tasks.add(new DayPilot.Task({
      id: "task-1",
      start: "2015-01-01",
      end: "2015-01-02",
      text: "Task 1"
  }));

  gantt.tasks.add(new DayPilot.Task({
      id: "task-2",
      start: "2015-01-02",
      end: "2015-01-03",
      text: "Task 1"
  }));

  gantt.links.add(new DayPilot.Link({
      id: "link-1",
      from: "task-1",
      to: "task-2",
      type: "FinishToStart"
  }));

  gantt.init();

</script>

DayPilot for JavaScript, ASP.NET WebForms, ASP.NET MVC, Java