new 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 |
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
Clear()
The Clear() method removes all links of the control and inits the control's scroll-bars
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:
|
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
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:
|
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. |
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
resPS()
The resPS/ResetPredSuccBars() method resets the predecessor/successor bars
- Since:
- 2.3