Skip to main content

API overview

Gantt properties

activeTaskOptional.Defines an active task for which the Editor dialog is opened
autoScaleOptional. Allows the timescale to change dynamically its start/end dates
cellBordersOptional. Defines borders style in the Gantt chart
cellHeightOptional. Defines the height of a cell in pixels
cellWidthOptional. Defines the width of a cell in pixels
columnsOptional. An array of objects with configuration parameters for columns in the grid area
durationUnitOptional. Defines duration unit for tasks
endOptional. Sets the end date of the timescale
highlightTimeOptional. Highlights specific time areas in the chart
lengthUnitOptional. Defines the minimal unit for task bars (the task length) in a chart
linksOptional. Defines links between tasks in Gantt
readonlyOptional. Prevents making changes to the data in Gantt
scaleHeightOptional. Defines the height of the header cell in pixels
scalesOptional. Defines the timescale of Gantt
selectedOptional. Marks tasks as selected
startOptional. Sets the start date of the timescale
taskTemplateOptional. Defines your own template for tasks bars
tasksOptional. An array of objects containing the tasks types data
tasksOptional. Defines tasks in Gantt
zoomEnables zooming in Gantt

Gantt actions

add-linkFires when adding a link
add-taskFires when adding a new task
copy-taskFires when copying a task
delete-linkFires when deleting a link
delete-taskFires when deleting a task
drag-taskFires when dragging a task
expand-scaleFires when the scale does not fill all free space in the chart and it's required to expand scale boundaries
hotkeyFires when applying a hotkey
indent-taskFires when indenting a task
move-taskFires when moving a task
open-taskFires when expanding a branch of tasks
provide-dataProvides new data for a branch
render-dataFires when data is rendered when scrolling
request-dataFires when data for a task branch is requested
scroll-chartFires when a chart is scrolled
select-taskFires when selecting a task
show-editorFires when opening the Editor dialog for a task
sort-tasksFires when sorting tasks
update-linkFires when updating a link
update-taskFires when updating a task
zoom-scaleFires when zooming a chart

Gantt methods

api.detach()Allows removing/detaching action handlers
api.exec()Allows triggering Gantt actions
api.getReactiveState()Gets the state object with the reactive properties of Gantt
api.getState()Gets the state object that stores current values of most Gantt properties
api.getStores()Gets an object with the DataStore properties of Gantt
api.getTask(id)Gets an object with the task configuration
api.intercept()Allows intercepting and blocking/modifying actions
api.on()Allows attaching a handler to the inner events
api.setNext()Allows adding some action into the Event Bus order