Members
(readonly) chartBody :Element|undefined
Type:
- Element |
undefined
(readonly) chartCanvas :HTMLCanvasElement|undefined
Type:
- HTMLCanvasElement |
undefined
(readonly) chartHeader :Element|undefined
Type:
- Element |
undefined
(readonly) chartHeight :Number
Height of the Chart measured in number of rows
Type:
- Number
(readonly) chartScroll :Element|undefined
Type:
- Element |
undefined
(readonly) columnWidth :Number
Type:
- Number
(readonly) columnWidthEm :Number
Type:
- Number
(readonly) columnsNumber :Number
Type:
- Number
(readonly) container :Element
Type:
- Element
- See
(readonly) data :Array.<ChartBar>
Type:
- Array.<ChartBar>
(constant) defaultOptions :ChartOptions
Type:
(readonly) end :external:DateTime|Number
Type:
- external:DateTime |
Number
(readonly) fontSize :Number
Type:
- Number
(readonly) options :ChartOptions
Type:
(readonly) rowHeight :Number
Type:
- Number
(readonly) rowsNumber :Number
Type:
- Number
(readonly) start :external:DateTime|Number
Type:
- external:DateTime |
Number
Methods
render() → {Promise.<Chart>}
Called automatically, when initializing a container for the first time through Chart.get
Will trigger ChartEvent#event:ChartRendered immediately AFTER resolving
- See
Returns:
- Type:
- Promise.<Chart>
renderBars() → {Promise.<Chart>}
Returns:
- Type:
- Promise.<Chart>
renderConnectingLines(forBar) → {Promise.<Chart>}
Parameters:
Name | Type | Description |
---|---|---|
forBar | ChartBar | |
Returns:
- Type:
- Promise.<Chart>
scrollTo(x, y, smoothopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
x | Number | |||
y | Number | |||
smooth | Boolean | <optional> | true |
setData(data, renderopt, renderOnlyBarsopt) → {Promise.<Chart>}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
data | Array.<ChartBar> | |||
render | Boolean | <optional> | true | |
renderOnlyBars | Boolean | <optional> | false | if set to `true`, only ChartBars will be rendered, not the entire Chart |
Returns:
- Type:
- Promise.<Chart>
setOptions(options, renderopt) → {Promise.<Chart>}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
options | ChartOptions | |||
render | Boolean | <optional> | true |
Returns:
- Type:
- Promise.<Chart>
setPeriod(start, end, renderopt) → {Promise.<Chart>}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
start | external:DateTime | | |||
end | external:DateTime | | |||
render | Boolean | <optional> | true |
Returns:
- Type:
- Promise.<Chart>
(static) get(container, options, start, end, data) → {Chart}
Main entrypoint to use the library. Provided Element will be the container of the Gantt Chart. Recommended to use a div element with sufficient width and height
Parameters:
Name | Type | Description |
---|---|---|
container | Element | Element |
options | ChartOptions | | |
start | external:DateTime | | If a String or a Number, will be treated as UTC, and then converted to ChartOptions#timezone. If DateTime, will only convert to ChartOptions#timezone |
end | external:DateTime | | If a String or a Number, will be treated as UTC, and then converted to ChartOptions#timezone. If DateTime, will only convert to ChartOptions#timezone |
data | Array.<ChartBar> |
Returns:
- Type:
- Chart