Skip to main content

API overview

Gantt properties

activeTaskDefines an active task for which the Editor dialog is opened
baselinesShows or hides tasks baselines
cellBordersDefines borders style in the Gantt chart
cellHeightDefines the height of a cell in pixels
cellWidthDefines the width of a cell in pixels
columnsAn array of objects with configuration parameters for columns
editorShapeAn array of objects containing settings for managing the appearance and functionality of the Editor dialog
endSets the end date of the timescale
highlightTimeHighlights specific time areas in the chart
lengthUnitDefines the minimal unit for task bars (the task length) in a chart
linksDefines links between tasks in Gantt
markersDefines visual markers on the time scale
readonlyPrevents making changes to the data in Gantt
scaleHeightDefines the height of the header cell in pixels
scalesDefines the timescale of Gantt
selectedMarks tasks as selected
startSets the start date of the timescale
taskTemplateDefines your own template for tasks bars
tasksAn array of objects containing the tasks types data
tasksDefines 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
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