Top
You are looking at an outdated 7.3.0 version of this document. Switch to the 7.14.3 version to see the up to date information.

class anychart.charts.Gantt Improve this Doc

Extends: anychart.core.Chart

Gantt chart implementation. TODO (A.Kudryavtsev): Describe. TODO (A.Kudryavtsev): Actually, must not be exported as is.

Methods Overview

Miscellaneous
collapseAll()Collapses all.
collapseTask()Collapses task.
data()Gets/sets chart data.
draw()Starts the rendering of the chart into the container.
expandAll()Expands all.
expandTask()Expands task.
fitAll()Fits all visible data to timeline width.
fitToTask()Fits timeline visible area to task's range.
getDataGrid()Getter for data grid.
getTimeline()Getter for timeline.
headerHeight()Gets/sets header height.
scrollTo()Performs vertical scroll to pxOffset.
scrollToEnd()Scrolls vertically to specified index.
scrollToRow()Performs vertical scroll to rowIndex specified.
splitterPosition()Gets/sets splitter position.
zoomIn()Timeline zoom in.
zoomOut()Timeline zoom out.
zoomTo()Timeline zoom to range.

Methods Description

collapseAll

Collapses all.

Returns:

anychart.charts.Gantt - - Itself for method chaining.

collapseTask

Collapses task.

Params:

Name Type Description
taskId string Task id.

Returns:

anychart.charts.Gantt - - Itself for method chaining.

data

Gets/sets chart data.

Params:

Name Type Description
data anychart.data.Tree | Array.<Object> Data tree or raw data.
fillMethod anychart.enums.TreeFillingMethod Fill method.

Returns:

anychart.data.Tree anychart.charts.Gantt - - Current value or itself for method chaining.

draw

Starts the rendering of the chart into the container.

Returns:

anychart.core.Chart - An instance of anychart.core.Chart class for method chaining.

expandAll

Expands all.

Returns:

anychart.charts.Gantt - - Itself for method chaining.

expandTask

Expands task.

Params:

Name Type Description
taskId string Task id.

Returns:

anychart.charts.Gantt - - Itself for method chaining.

fitAll

Fits all visible data to timeline width. TODO (A.Kudryavtsev): Change description.

Returns:

anychart.charts.Gantt - - Itself for method chaining.

fitToTask

Fits timeline visible area to task's range. TODO (A.Kudryavtsev): Change description.

Params:

Name Type Description
taskId string Task id.

Returns:

anychart.charts.Gantt - - Itself for method chaining.

getDataGrid

Getter for data grid. TODO (A.Kudryavtsev): Turn it to getter for a while?

Params:

Name Type Description
value null | string | Object | anychart.core.ui.DataGrid Value to be set.

Returns:

anychart.core.ui.DataGrid - - Chart's timeline.

getTimeline

Getter for timeline. TODO (A.Kudryavtsev): Turn it to getter for a while?

Params:

Name Type Description
value null | string | Object | anychart.core.gantt.Timeline Value to be set.

Returns:

anychart.core.gantt.Timeline - - Chart's timeline.

headerHeight

Gets/sets header height.

Params:

Name Type Description
value number | string Value to be set.

Returns:

anychart.charts.Gantt number string - - Current value or itself for method chaining.

scrollTo

Performs vertical scroll to pxOffset. TODO (A.Kudryavtsev): See full description in related method of controller.

Params:

Name Type Description
pxOffset number Pixel offset.

Returns:

anychart.charts.Gantt - - Itself for method chaining.

scrollToEnd

Scrolls vertically to specified index.

Params:

Name Type Description
index number End index to scroll to.

Returns:

anychart.charts.Gantt - - Itself for method chaining.

scrollToRow

Performs vertical scroll to rowIndex specified. TODO (A.Kudryavtsev): See full description in related method of controller.

Params:

Name Type Description
rowIndex number Row index.

Returns:

anychart.charts.Gantt - - Itself for method chaining.

splitterPosition

Gets/sets splitter position.

Params:

Name Type Description
value string | number Pixel or percent value. Actually sets a width of data grid.

Returns:

anychart.charts.Gantt number string - - Current value or itself for method chaining.

zoomIn

Timeline zoom in.

Params:

Name Type Description
zoomFactor number Zoom factor.

Returns:

anychart.charts.Gantt - - Itself for method chaining.

zoomOut

Timeline zoom out.

Params:

Name Type Description
zoomFactor number Zoom factor.

Returns:

anychart.charts.Gantt - - Itself for method chaining.

zoomTo

Timeline zoom to range. TODO (A.Kudryavtsev): Take full behaviour description from scale's zoomTo() method.

Params:

Name Type Description
startDate number Start date.
endDate number End date.

Returns:

anychart.charts.Gantt - - Itself for method chaining.