Links class (Gantt)

Links(oChart)

The Links object holds a collection of Link objects (a link between two bars). The Links / GetLinks() method gets access to the control's links.
Parameters:
Name Type Description
oChart Chart Specifies the control's chart as an object of Chart type
Links

Methods

Add(oLinkOptsopt) → {Link}

The Add() method creates and adds a link between two bars.
Parameters:
Name Type Attributes Description
oLinkOpts object <optional>
Specifies the options to create the new link as an object of LinkOptions type
Returns:
Returns the newly created link, as an object of Link type, or null if adding the new link fails (a link between bars is not allowed).
Type
Link
Add

Clear()

The Clear() method removes all links of the control and inits the control's scroll-bars
Clear

GetCount() → {number}

The GetCount() method returns the number of links within the collection.
Returns:
Returns the number of links within the collection
Type
number
Example
The following statements are equivalents:

 oGantt.Chart.Links.GetCount(), count of links(types of links) within the collection
 oGantt.Chart.Links.Count, count of links(types of links) within the collection

where oGantt is an object of Gantt type
GetCount

Item(id) → {Link}

The Item() method gets the link giving its index, identifier/key or reference.
Parameters:
Name Type Description
id number | string | Link The id parameter could be any of the following:
  • id {number}, indicates a numeric value that defines the index of the link to request
  • id {string}, specifies a string expression that defines the identifier/key/plain-caption of the link to request
  • id {Link}, specifies the object reference to the link to request for
Returns:
Returns null if the link is not found, or an object of Link type, if the links collection contains the giving id.
Type
Link
Item

Remove(id)

The Remove() method removes a link from the collection.
Parameters:
Name Type Description
id number | string | Link The id parameter could be any of the following:
  • id {number}, indicates a numeric value that defines the index of the link to request
  • id {string}, specifies a string expression that defines the identifier/key/plain-caption of the link to request
  • id {Link}, specifies the object reference to the link to request for
Remove

RemoveRange(range)

The RemoveRange() method removes multiple-links at once
Parameters:
Name Type Description
range any Indicates a link, an array of [Link] type, or exontrol.Arr.
RemoveRange

gPS() → {PredSucc}

The gPS/getPredSuccBars() method gets (builds if required) an object of PredSucc type, that holds bar's predecessor/successor
Since:
  • 2.3
Returns:
Returns an object of PredSucc type
Type
PredSucc
gPS

resPS()

The resPS/ResetPredSuccBars() method resets the predecessor/successor bars
Since:
  • 2.3
resPS