new GV(oGantt)
The GV class defines the chart's view, which displays the tasks of the chart, according with the chart's time-scale.
Parameters:
Name | Type | Description |
---|---|---|
oGantt |
Gantt | Specifies an object of Gantt type that defines the owner control of the view to create. |
Methods
EnsureVisibleClient(clientA, ensureOptsopt)
The EnsureVisibleClient() method ensures that the giving client fits the chart's client area.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
clientA |
object | The client parameter could be any of the following:
|
|||||||||||||||||||||||||||||||
ensureOpts |
object |
<optional> |
Specifies different options to run the current method, as an object of {force, allowScale, allowScroll, nearestFit, duration, thisArg, cbkR, cbkI, cbkT}
Properties
|
EnsureVisibleSelection(ensureOpts)
The EnsureVisibleSelection() method scrolls the control's content to ensure that the control's selection fits the control's client area
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ensureOpts |
object | Specifies different options to run the current method, as an object of {expandParents, selection, duration} type
Properties
|
GetFirstVisibleDate() → {Date}
The GetFirstVisibleDate() method gets the view's first visible date. The GetLastVisibleDate() method gets the view's last visible date.
Returns:
Returns the view's first visible date.
- Type
- Date
Example
The following statements are equivalents:
oGantt.oGV.GetFirstVisibleDate(), gets the view's first visible date
oGantt.oGV.FirstVisibleDate, gets the view's first visible date
where oGantt is an object of Gantt type
GetFirstVisibleDate
GetLastVisibleDate() → {Date}
The GetLastVisibleDate() method gets the view's last visible date. The GetFirstVisibleDate() method gets the view's first visible date.
Returns:
Returns view's last visible date
- Type
- Date
Example
The following statements are equivalents:
oGantt.oGV.GetLastVisibleDate(), gets the view's last visible date
oGantt.oGV.LastVisibleDate, gets the view's last visible date
where oGantt is an object of Gantt type
GetLastVisibleDate
GetScrollRect() → {Array.<number>}
The GetScrollRect() method gets the current scroll-rectangle
Returns:
Returns the scroll-rectangle as an array of [x,y,width,height] type
- Type
- Array.<number>
GetVisibleRect() → {Array.<number>}
The GetVisibleRect() method indicates the control's visible rectangle
Returns:
Returns an array of [x,y,width,height] type that specifies the canvas's client rectangle
- Type
- Array.<number>
SetFirstVisibleDate(value)
The SetFirstVisibleDate() method changes view's first visible date
Parameters:
Name | Type | Description |
---|---|---|
value |
number | string | Date | A value of one of the following types:
|
Example
The following statements are equivalents:
oGantt.oGV.SetFirstVisibleDate("#12/31/1971#"), sets the view's first visible date
oGantt.oGV.FirstVisibleDate = "#12/31/1971#", sets the view's first visible date
where oGantt is an object of Gantt type
SetFirstVisibleDate
Zoom(start, end, changeUnitWidthopt)
The Zoom() method zooms the view so the start-end interval fits the client's area.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
start |
number | string | Date | A value of one of the following types:
|
|
end |
number | string | Date | A value of one of the following types:
|
|
changeUnitWidth |
boolean |
<optional> |
Specifies whether the chart's unit-width is changed (defaults to true) |
- Since:
- 1.6