Skip to main content

addLink

Description

Adds a new dependency link

addLink: (link: any) => string | number

Parameters

  • link - (required) object - the link object

Returns

  • id - (string | number) - the link's id

Example

var linkId = gantt.addLink({
id:1,
source:1,
target:2,
type:gantt.config.links.finish_to_start
});

Details

The method invokes the onBeforeLinkAdd and onAfterLinkAdd events.