DayPilot.Link.data

The data property (object) holds the raw link data used by the DayPilot.Link() constructor and when loading links to Scheduler and Gantt Chart components.

Declaration

DayPilot.Link.data

Possible Values

Core properties

  • from (source task id)

  • to (target task id)

  • id (optional)

  • type (optional, default type is "FinishToStart")

Optional properties

  • width (integer) - custom line width

  • color (string) - custom link color

  • style (string) - custom line style, uses border-style CSS syntax

  • cssClass (string) - CSS class that will be added to all parts (elements) of the link

  • layer (string) - determines the layer relative to events: "Above" | "Below" (default is "Above")

  • text (string) - text to be displayed above the link curve (supported for curved links of the "FinishToStart" type since version 2023.4.5810)

  • textAlignment ("start" | "center" | "end") - alignment of the link text (since version 2024.1.5898)

Notes

  • Use the same raw object structure when you create a new DayPilot.Link() constructor instance directly and when you load dependency links into Scheduler and Gantt components.

Example

const data = {
  id: "link-1",
  from: "task-1",
  to: "task-2",
  type: "FinishToStart"
};

const link = new DayPilot.Link(data);

See Also

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript