ILink interface defines a dependency link between two tasks. Links are rendered as arrows on the Gantt chart and can represent four types of task relationships.
TypeScript definition
Fields
string | number
Unique identifier for the link. Auto-generated if omitted when adding a link via
api.exec("add-link", ...).string | number
required
ID of the predecessor (source) task — the task that the dependent task follows.
string | number
required
ID of the successor (target) task — the task that depends on the source.
s2s
required
The link type, describing which endpoints of the source and target tasks are connected. See Link types below.
number
A time offset in
durationUnit units (days by default). A positive lag introduces a delay between the two tasks. A negative value represents lead time (overlap). Defaults to 0.Link types
The four link types define the dependency relationship using the start (s) and end (e) points of the source and target tasks.
The default link type when creating a link by dragging in the UI is
e2s.Examples
- End-to-Start link
- With lag
- Adding a link via API