Skip to main content

API overview

Gantt methods

NameDescription
PromisePromise object constructor
addCalendarAdds a calendar into Gantt
addLinkAdds a new dependency link
addLinkLayerDisplays an additional layer with custom elements for a link in the timeline area
addMarkerAdds a marker to the timeline area
addShortcutAdds a new keyboard shortcut
addTaskAdds a new task
addTaskLayerDisplays an additional layer with custom elements for a task in the timeline area
adjustTaskHeightForBaselinesAdjusts the task's row height for proper display of baseline elements
alertCalls an alert message box
assertIf the specified expression is false, an errorMessage is shown in the red popup at the top right corner of the screen
attachEventAttaches the handler to an inner event of dhtmlxGantt
autoScheduleRecalculates the schedule of the project
batchUpdateUpdates multiple tasks/links at once
bindCreates a new function that, when called, has its this keyword set to the provided value
calculateDurationCalculates the duration of a task
calculateEndDateCalculates the end date of a task
calculateTaskLevelCalculates the level of nesting of a task
callEventCalls an inner event
changeLightboxTypeRepaints the lighbox for the task according to its type
changeLinkIdChanges the link's id
changeTaskIdChanges the task's id
checkEventChecks whether an event has some handler(s) specified
clearAllRemoves all tasks and additional elements (including markers) from the Gantt chart
clearRedoStackClears the stack of stored redo commands
clearUndoStackClears the stack of stored undo commands
closeCloses the branch with the specified id
collapseCollapses gantt from the full screen mode to the normal mode
columnIndexByDateReturns the index of the column by the date
confirmCalls a confirm message box
copyCreates a deep copy of provided object
correctTaskWorkTimeRecalculates the task duration in the work time
createCalendarCreates a working calendar
createDataProcessorCreates a new dataProcessor instance and attaches it to gantt
createDatastoreCreates a datastore according to the provided configuration
createTaskAdds a new task and opens the lightbox to confirm
dataProcessorDataProcessor constructor
dateFromPosGets the date of the specified horizontal position in the chart area
definedReturns false if the provided argument is undefined, otherwise true
deleteCalendarDeletes a task calendar by its id
deleteLinkDeletes the specified dependency link
deleteMarkerDeletes the specified marker
deleteTaskDeletes the specified task
destructorDestroys the gantt instance
detachAllEventsDetaches all events from dhtmlxGantt (both custom and inner ones)
detachEventDetaches a handler from an event (which was attached before by the attachEvent() method
eachParentIterates over all parent tasks of the specified task in the Gantt chart
eachSelectedTaskIterates over all selected tasks in the Gantt chart
eachTaskIterates over all child tasks of a specific task or the of whole Gantt chart
eventAttaches an event handler to an HTML element
eventRemoveRemoves an event handler from an HTML element
expandExpands gantt to the full screen mode
exportToExcelExports data from the Gantt chart to an Excel document
exportToICalExports data from the Gantt chart to an iCal string
exportToJSONExports the structure and data of a Gantt chart into a JSON object
exportToMSProjectExports data from the Gantt chart to MS Project
exportToPDFExports a Gantt chart into the PDF format
exportToPNGExports a Gantt chart into the PNG format
exporttoprimaverap6Exports data from the Gantt chart to Primavera P6
findCyclesReturns all dependency loops in the chart
focusSets focus on the gantt
getCalendarGets worktime calendar by id
getCalendarsGets all the calendars added into Gantt
getChildrenReturns the 1st-level child tasks of the specified parent branch
getClosestWorkTimeReturns the closest working time
getColumnIndexReturns the index of the column by its name
getConnectedGroupReturns all tasks and links that a task is connected with
getConstraintLimitationsReturns the earliest and latest dates allowed by the constraint applied to a task
getConstraintTypeReturns the constraint type applied to the task
getDatastoreReturns the configuration object of a datastore
getFreeSlackReturns the free slack of a task
getGlobalTaskIndexGets the index of a task in the tree
getGridColumnGets the configuration object of a column
getGridColumnsGets columns of the Gantt chart
getLabelGets the label of a select control in the lightbox
getLastSelectedTaskReturns the id of the last selected task
getLayoutViewReturns the object of the layout view by its name
getLightboxGets the lightbox's HTML object element
getLightboxSectionReturns the object of the lightbox's section
getLightboxTypeReturns the name of the active lighbox's structure
getLightboxValuesReturns values of the lightbox's sections
getLinkReturns the dependency link object by the specified id
getLinkCountReturns the number of all dependency links presented in the Gantt chart
getLinkNodeReturns the HTML element of the specified dependency link
getLinksReturns all links presented in the Gantt chart
getMarkerGets the marker's object
getNextReturns the id of the next item (no matter what the level of nesting is: the same or different)
getNextSiblingReturns the id of the next task of the same level
getParentReturns the id of the parent task
getPrevReturns the id of the previous item (no matter what the level of nesting is: the same or different)
getPrevSiblingReturns the id of the previous task of the same level
getRedoStackReturns the stack of stored redo user actions
getResourceAssignmentsReturns all tasks assigned to the resource
getResourceCalendarReturns a calendar which the resource is assigned to
getScaleReturns the configuration of the time scale
getScrollStateReturns the scroll position
getSelectedIdReturns the id of the selected task
getSelectedTasksReturns an array of the currently selected tasks
getShortcutHandlerGets a key navigation shortcut handler
getSiblingsReturns siblings of the specified task (including itself)
getSlackChecks how much time (in the current duration unit) a task has before it starts to affect other tasks
getStateGets the current state of the Gantt chart
getSubtaskDatesCalculates the combined start/end dates of tasks nested in a project or another task
getSubtaskDurationCalculates the combined duration of tasks nested in a project or another task.
getTaskReturns the task object
getTaskAssignmentsReturns the parsed resource assignments of a specific task from the datastore
getTaskBarHeightReturns the height (in pixels) of the DOM element of the task
getTaskBaselinesReturns an array of baselines of a specific task from the datastore
getTaskByFinds a task by the specified criteria
getTaskByIndexReturns a task by its global task index
getTaskByTimeReturns a collection of tasks which occur during the specified period
getTaskByWBSCodeReturns a task by its WBS code
getTaskCalendarGets a calendar assigned to the specified task (a task level calendar)
getTaskCountGets the number of tasks that are currently loaded in the gantt
getTaskHeightReturns the visible height of a task
getTaskIndexGets the index of a task in the branch
getTaskNodeReturns the HTML element of the task bar
getTaskPositionCalculates the position and size of the task's DOM element in the timeline area
getTaskResourcesReturns the array of unique resources assigned to a specific task from the datastore
getTaskRowNodeReturns the HTML element of the task row in the table
getTaskTopGets the top position of the task's DOM element in the timeline area
getTaskTypeReturns the type of a task
getTotalSlackReturns the total slack of a task
getUndoStackReturns the stack of stored undo user actions
getVisibleTaskCountGets the number of tasks visible on the screen (those that are not collapsed)
getWBSCodeReturns the WBS code (the outline number) of a task
getWorkHoursReturns the working hours of the specified date
groupByGroups tasks by the specified task's attribute
hasChildReturns the number of child task(s)
hideCoverHides the lightbox modal overlay that blocks interactions with the remaining screen
hideLightboxCloses the lightbox if it's currently active
hideQuickInfoHides the pop-up task form (if it's currently active)
importFromExcelConverts an Excel file to JSON
importFromMSProjectConverts an XML or MPP MS Project file to JSON
importfromprimaverap6Converts an XML or XER Primavera P6 file to JSON
initInitializes a dhtmlxGantt inside a container
isChildOfChecks whether a task is a child of a different task
isCircularLinkChecks whether the link is circular
isCriticalLinkChecks whether the specified link is critical
isCriticalTaskChecks whether the specified task is critical
isLinkAllowedChecks whether the specified link is correct
isLinkExistsChecks whether the specified link exists
isReadonlyChecks whether the specified task/link, or the whole Gantt is read-only
isSelectedTaskChecks whether the specified task is currently selected
isSplitTaskChecks whether the specified task is split
isSummaryTaskChecks whether the specified task is summary
isTaskExistsChecks whether the specified task exists
isTaskVisibleChecks whether the specifies task is currently rendered in the Gantt chart
isUnscheduledTaskChecks if the task is unscheduled
isWorkTimeChecks whether the specified date is working or not
loadLoads data to the gantt from an external data source
locateGets the id of a task from the specified HTML event
mergeCalendarsMerges several working calendars into one
messageCalls a message box of the specified type
mixinAdds properties of the 'source' object into the 'target' object
modalboxCalls a modalbox
moveTaskMoves a task to a new position
openOpens the branch with the specified id
parseLoads data from a client-side resource
pluginsActivates the specified extensions
posFromDateGets the relative horizontal position of the specified date in the chart area
redoApplies the reverted changes to the gantt once again
refreshDataRefreshes data in the Gantt chart
refreshLinkRefreshes the specifies link
refreshTaskRefreshes the task and its related links
removeLinkLayerRemoves the specified layer related to a link
removeShortcutRemoves a keyboard shortcut
removeTaskLayerRemoves the specified layer related to a task
renderRenders the whole Gantt chart
renderMarkersUpdates all markers on the page
resetLayoutRebuilds the Gantt layout using the current value of the layout config
resetLightboxRemoves the current lightbox's HTML object element
resetProjectDatesRe-calculates the duration of a project task depending on the dates of its children
resetSkinRe-calculates the skin's settings from the related attached skin CSS file
resizeLightboxForces the lightbox to resize
roundDateRounds the specified date to the nearest date in the time scale
roundTaskDatesRounds the start and end task's dates to the nearest dates in the time scale
scrollLayoutCellScrolls the layout view to the specified position
scrollToScrolls the Gantt container to the specified position
selectTaskSelects the specified task
serializeSerializes the data into JSON or XML format
serverListReturns a list of options
setParentSet the parent for a task
setSizesResizes the Gantt chart
setSkinSets the active skin
setWorkTimeSets the working time for the Gantt chart
showCoverShows the lightbox modal overlay that blocks interactions with the remaining screen
showDateScrolls the chart area to makes the specified date visible
showLightboxOpens the lightbox for the specified task
showQuickInfoDisplays the pop-up task form for the specified task
showTaskMakes the specified task visible on the screen
silentMakes all code inside it not to trigger internal events or server-side calls
sortSorts tasks in the grid
toggleTaskSelectionSelects the specified task if it was unselected and vice versa
uidReturns a unique id
undoReverts the changes made in the gantt
unselectTaskRemoves selection from the selected task
unsetWorkTimeUnsets a working time in the Gantt Chart
updateCollectionUpdates the specified collection with new options
updateLinkUpdates the specified dependency link
updateMarkerUpdates the specified marker
updateTaskUpdates the specified task
updateTaskAssignmentsUpdates the resource property of the task object with the values of the resource assignments from the datastore

Gantt properties

NameDescription
auto_scheduling_compatibilityDisables usage of time contraints for tasks
auto_schedulingEnables auto scheduling
auto_scheduling_descendant_linksAllows or forbids creating links from parent tasks (projects) to their children
auto_scheduling_initialDefines whether gantt will do autoscheduling on data loading/parsing
auto_scheduling_move_projectsDefines whether the whole project will be moved (see the details below)
auto_scheduling_project_constraintDefines whether tasks should inherit the constraint type from their parent project
auto_scheduling_strictEnables the auto scheduling mode, in which tasks will always be rescheduled to the earliest possible date
auto_scheduling_use_progressSets the way the scheduling algorithms process completed tasks
auto_typesAutomatically converts tasks with subtasks to projects and projects without subtasks back to tasks
autofitEnables automatic adjusting of the grid's columns to the grid's width
autoscrollEnables autoscrolling while dragging a task or a link out of the current browser screen
autoscroll_speedDefines the speed of autoscrolling (in ms) while dragging a task or link out of the current browser screen
autosizeForces the Gantt chart to automatically change its size to show all tasks without scrolling
autosize_min_widthSets the minimum width (in pixels) that the Gantt chart can take in the horizontal 'autosize' mode
bar_heightSets the height of task bars in the timeline area
bar_height_paddingAdjusts the padding around task bars in the timeline when bar_height is set to "full"
baselinesConfigures the functionality of baselines in the Gantt chart
branch_loadingEnables dynamic loading in the Gantt chart
branch_loading_propertySpecifies that the task has children that are not yet loaded from the backend
buttons_leftStores a collection of buttons resided in the left bottom corner of the lightbox
buttons_rightStores a collection of buttons resided in the right bottom corner of the lightbox
calendar_propertyChanges the name of the property that affects binding of a calendar to a task/group of tasks
cascade_deleteEnables cascade deleting of nested tasks and links
click_dragEnables advanced drag-n-drop
columnsConfigures the columns of the table
constraint_typesContains all available constraint types
container_resize_methodDefines whether the gantt should track resizing of the container at time intervals
container_resize_timeoutSpecifies the delay (in milliseconds) before redrawing the gantt when resizing the container
correct_work_timeEnables adjusting the task's start and end dates to the work time (while dragging)
cspDefines internal implementation of the code of date formatting methods
date_formatSets the date format that is used to parse data from a data set and to send dates back to the server
date_gridSets the format of dates in the "Start time" column of the table
date_scaleSets the format of the time scale (X-Axis)
deadlinesEnables or disables the display of deadline elements for tasks
deepcopy_on_parseDefines whether gantt will perform a deep copy of data objects passed into the gantt.parse() method
details_on_create'says' to open the lightbox while creating new events by clicking the '+' button
details_on_dblclick'says' to open the lightbox after double clicking on a task
drag_lightboxEnables the possibility to drag the lightbox by the header
drag_linksEnables creating dependency links by drag-and-drop
drag_modeStores the types of available drag-and-drop modes
drag_moveEnables the possibility to move tasks by drag-and-drop
drag_multipleEnables the possibility to drag several selected tasks at once
drag_progressEnables the possibility to change the task progress by dragging the progress knob
drag_projectEnables drag and drop of items of the project type
drag_resizeEnables the possibility to resize tasks by drag-and-drop
drag_timelineConfigures the behavior of the drag_timeline extension
duration_stepSets the number of 'gantt.config.duration_unit' units that will correspond to one unit of the 'duration' data property.
duration_unitSets the duration unit
dynamic_resource_calendarsEnables automatic merging of multiple resource calendars into one
editable_propertyChanges the name of a property that affects the editing ability of tasks/links in the read-only Gantt chart
editor_typesAn object that contains definitions of inline editors
end_dateSets the end value of the time scale
external_renderRenders an external component into the DOM
fit_tasks'says' the Gantt chart to automatically extend the time scale in order to fit all displayed tasks
grid_elastic_columnsAdjusts the width of columns inside a scrollable grid
grid_resizeMakes the grid resizable by dragging the right grid's border
grid_resizer_attributeSets the name of the attribute of the grid resizer's DOM element
grid_resizer_column_attributeSets the name of the attribute of the column resizer's DOM element. The attribute presents the column's index
grid_widthSets the width of the grid
highlight_critical_pathShows the critical path in the chart
horizontal_scroll_keyEnables/disables horizontal scroll by the Shift
inherit_calendarDefines whether tasks should inherit work calendars from their summary parents
inherit_scale_classSpecifies whether sub-scales shall use the scale_cell_class template by default
initial_scrollSets whether the timeline area will be initially scrolled to display the earliest task
inline_editors_date_processingKeeps the duration of a task unchanged during editing of the start/end of a task
inline_editors_multiselect_openDefines whether inline editor should be opened after one click on a task when multi-task selection is enabled
keep_grid_width'says' to preserve the initial grid's width while resizing columns within
keyboard_navigationEnables keyboard navigation in gantt
keyboard_navigation_cellsEnables keyboard navigation by cells
layer_attributeSets the name of the attribute of the task layer's DOM element
layoutSpecifies the layout object
lightboxSpecifies the lightbox object
lightbox_additional_heightIncreases the height of the lightbox
link_arrow_sizeSets the size of the link arrow
link_attributeSets the name of the attribute that will specify the id of the link's HTML element
link_line_widthSets the width of dependency links in the timeline area
link_radiusSets the radius for rounding corners of link lines in the timeline
link_wrapper_widthSets the width of the area (over the link) sensitive to clicks
linksStores the types of links dependencies
min_column_widthSets the minimum width for a column in the timeline area
min_durationSets the minimum duration (in milliseconds) that can be set for a task during resizing.
min_grid_column_widthSets the minimal width for each grid column (in pixels) while resizing grid
min_task_grid_row_heightSets the minimal row height that can be set for a task during resizing
multiselectEnables/disables multi-task selection in the Gantt chart
multiselect_one_levelSpecifies whether multi-task selection will be available within one or any level
open_split_tasksEnables the possibility to expand/collapse split tasks by clicking the +/- button
open_tree_initiallyOpenes all branches initially
order_branchActivates the 'branch' mode that allows vertically reordering tasks within the same tree level
order_branch_freeActivates the 'branch' mode that allows reordering tasks within the whole gantt
placeholder_taskAdds an empty row into the end of the list of tasks to simplify tasks editing via keyboard
preserve_scrollPreserves the current position of the vertical and horizontal scrolls while re-drawing the gantt chart
prevent_default_scrollSpecifies whether the gantt container should block the mousewheel event, or should it be propagated up to the window element
process_resource_assignmentsEnables/disables parsing of the resource assignments
project_endSpecifies the end date of a project
project_startSpecifies the start date of a project
quick_info_detachedDefines whether the task form will appear from the left/right side of the screen or near the selected task
quickinfo_buttonsStores a collection of buttons resided in the pop-up task's details form
readonlyActivates the read-only mode for the Gantt chart
readonly_propertyChanges the name of a property that affects the read-only behaviour of tasks/links
redoEnables the Redo functionality for the gantt
reorder_grid_columnsEnables the possibility to reorder grid columns by drag and drop
resize_rowsEnables the ability to adjust the row height by drag-and-drop
resource_assignment_storeSpecifies the name of the dataStore which stores resource assignments
resource_attributeChanges the name of the attribute that Gantt uses to find which resource the task row in the resource grid/timeline is referring to
resource_calendarsDefines a set of working calendars that can be assigned to a specific resource, e.g. a user
resource_propertyDefines the property of a task object that stores a resource id associated with resourceGrid/Timeline/Histogram/Calendar
resource_render_empty_cellsTells the resource timeline to render elements and call templates for non-allocated cells
resource_storeSpecifies the name of the dataStore connected to the resourceGrid/resourceTimeline/resourceHistogram views
resourcesDefines an extra configuration for the resource store
root_idSets the id of the virtual root element
round_dnd_datesEnables rounding the task's start and end dates to the nearest scale marks
row_heightSets the default height for rows of the table
rtlSwitches gantt to the right-to-left mode
scale_heightSets the height of the time scale and the header of the grid
scale_offset_minimalSets the minimal scale unit (in case multiple scales are used) as the interval of the leading/closing empty space
scale_unitSets the unit of the time scale (X-Axis)
scalesDefines configuration settings of the time scale
schedule_from_endEnables backward scheduling
scroll_on_clickSpecifies whether the timeline area shall be scrolled while selecting to display the selected task
scroll_sizeSet the sizes of the vertical (width) and horizontal (height) scrolls
select_taskEnables selection of tasks in the Gantt chart
server_utcEnables converting server-side dates from UTC to a local time zone (and backward) while sending data to the server
show_chartShows the chart (timeline) area of the Gantt chart
show_empty_stateDefines whether to display the placeholder element inside the grid when it is empty
show_errorsEnables showing error alerts in case of unexpected behavior
show_gridShows the grid area of the Gantt chart
show_linksEnables/disables displaying links in the Gantt chart
show_markersShows/hides markers on the page
show_progressEnables displaying of the progress inside the task bars
show_quick_infoActivates/disables the 'quick_info' extension (pop-up task's details form)
show_task_cellsEnables/disables displaying column borders in the chart area
show_tasks_outside_timescaleEnables showing tasks that are outside the specified date range in the Gantt chart
show_unscheduledEnables showing unscheduled tasks
skip_off_timeHides non-working time from the time scale
smart_renderingEnables the smart rendering mode for gantt's tasks and links rendering
smart_scalesSpecifies that only visible part of the time scale is rendered on the screen
sortEnables sorting in the table
start_dateSets the start value of the time scale
start_on_mondaySets the starting day of the week
static_backgroundGenerates a background image for the timeline area instead of rendering actual columns' and rows' lines
static_background_cellsEnables rendering of highlighted cells in the static_background mode
stepSets the step of the time scale (X-Axis)
task_attributeSets the name of the attribute that will specify the id of the task's HTML element
task_dateSets the format of the date label in the 'Time period' section of the lightbox
task_grid_row_resizer_attributeSets the name of the attribute of the resizer's DOM element of the grid row. The attribute presents the row's index
task_heightSets the height of task bars in the timeline area
task_scroll_offsetSets the offset (in pixels) of the nearest task from the left border in the timeline
time_pickerSets the format of the time drop-down selector in the lightbox
time_stepSets the minimum step (in minutes) for the task's time values
timeline_placeholderShows the background grid in the empty timeline
tooltip_hide_timeoutSets the length of time, in milliseconds, before the tooltip hides
tooltip_offset_xSets the right (if positive) offset of the tooltip's position
tooltip_offset_ySets the top (if positive) offset of the tooltip's position
tooltip_timeoutSets the timeout in milliseconds before the tooltip is displayed for a task
touchEnables/disables the touch support for the Gantt chart
touch_dragDefines the time period in milliseconds that is used to differ the long touch gesture from the scroll gesture
touch_feedbackReturns vibration feedback before/after drag and drop on touch devices
touch_feedback_durationDefines the duration of vibration feedback before/after drag and drop on touch devices (in milliseconds)
type_renderersRedefines functions responsible for displaying different types of tasks
typesStores the names of lightbox's structures (used for different types of tasks)
undoEnables the Undo functionality for the gantt
undo_actionsSets the actions that the Undo operation will revert
undo_stepsSets the number of steps that should be reverted by the undo method
undo_typesSets the types of entities for which the Undo operation will be applied
wai_aria_attributesEnables WAI-ARIA support to make the component recognizable for screen readers
wheel_scroll_sensitivitySpecifies the speed of scrolling the gantt by the mouse wheel
wide_formSets both the section and its label on the same line
work_timeEnables calculating the duration of tasks in working time instead of calendar time
xml_dateDefines date formats that are used to parse data from a data set and to send data to a server

Gantt events

NameDescription
onAfterAutoScheduleFires when autoscheduling is done
onAfterBatchUpdateFires after the batchUpdate method was called
onAfterBranchLoadingIf dynamic loading is enabled, fires after the task branch was loaded to the page
onAfterLightboxFires after the user has closed the lightbox (edit form)
onAfterLinkAddFires after a new link is added to the Gantt chart
onAfterLinkDeleteFires after the user deletes a link
onAfterLinkUpdateFires after the user updates a link
onAfterQuickInfoFires after the pop-up edit form is closed
onAfterRedoFires after the redo() method was called
onAfterRowResizeFires after resizing of the row height is finished
onAfterSortFires after tasks are sorted in the grid
onAfterTaskAddFires after the user adds a task to the Gantt chart
onAfterTaskAutoScheduleFires for each task which has been autoscheduled
onAfterTaskDeleteFires after the user deletes a task
onAfterTaskDragFires after the user has finished to drag and released the mouse button
onAfterTaskMoveFires after a task was moved to a new vertical position
onAfterTaskUpdateFires after the user updates a task
onAfterUndoFires after the undo() method was called
onAjaxErrorFires if the server returns an error
onAutoScheduleCircularLinkFires if some dependency loops were found during auto scheduling
onBeforeAutoScheduleFires before auto scheduling
onBeforeBatchUpdateFires before the batchUpdate method is called
onBeforeBranchLoadingIf dynamic loading is enabled, fires after a user expands the task branch but before loading starts
onBeforeCollapseBefore gantt exits the fullscreen mode and goes back to normal mode
onBeforeDataRenderFires before data is rendered on the page
onBeforeExpandFires before gantt is expanded to full screen
onBeforeGanttReadyFires before the dhtmlxGantt initialization is started
onBeforeGanttRenderFires before the Gantt chart is rendered on the page
onBeforeLightboxFires immediately before the user opens the lightbox (edit form)
onBeforeLinkAddFires before a new link is added to the Gantt chart
onBeforeLinkDeleteFires before the user deletes a link
onBeforeLinkDisplayFires after the links have been loaded to the Gantt chart but before they are displayed
onBeforeLinkUpdateFires before a link is updated
onBeforeMultiSelectFires before selecting a task or a range of tasks
onBeforeParseFires before data started to be parsed
onBeforeRedoFires before the redo() method is called
onBeforeRedoStackFires before an action is added into the redo stack
onBeforeRollupTaskDisplayFires before the rollup task is displayed on its parent project
onBeforeRowDragEndFires when a user drops a row in the grid
onBeforeRowDragMoveFires before a row of the grid is dragged vertically to a different position
onBeforeRowResizeFires before the user starts to resize the row height by drag-and-drop
onBeforeRowResizeEndFires before resizing of the row height is completed
onBeforeSplitTaskDisplayFires before a part of the split task is displayed on the Gantt chart
onBeforeTaskAddFires before a new task is added to the Gantt chart
onBeforeTaskAutoScheduleFires for each task which is rescheduled
onBeforeTaskChangedFires after the user has finished dragging and released the mouse button but before the changes are applied
onBeforeTaskDeleteFires before the user deletes a task
onBeforeTaskDisplayFires after the tasks have been loaded to the Gantt chart, but before they are displayed
onBeforeTaskDragFires after the user has pressed the mouse button and started dragging, but before dhtmlxGantt starts the drag-and-drop operation
onBeforeTaskMoveFires before a task is moved to a new vertical position
onBeforeTaskMultiSelectFires before the task selection state is being changed (the task is being selected or unselected)
onBeforeTaskSelectedFires before the user selects a task
onBeforeTaskUpdateFires before the user updates a task
onBeforeUndoFires before the undo() method is called
onBeforeUndoStackFires before an action is added into the undo stack
onCircularLinkErrorFires when the circular reference has been detected and auto scheduling is not possible
onClearFires after all tasks were removed from the Gantt chart by the clearAll method
onCollapseFires when gantt went back to normal mode from the full screen mode
onColumnResizeFires when the user is dragging the column's border to resize the column
onColumnResizeEndFires after the user finished dragging the column's border to resize the column
onColumnResizeStartFires before the user starts to drag the column's border to resize the column
onContextMenuFires when a user clicks the right mouse button inside the Gantt chart (see the details)
onDataProcessorReadyFires on the dp.init(gantt) call
onDataRenderFires after data has been rendered on the page
onDestroyCalled after gantt has been cleared by the destructor method
onEmptyClickFires when the user clicks on an empty space in the Gantt chart (not on tasks)
onErrorFires when assert receives 'false' value, i.e. when assertion fails
onExpandFires when gantt is expanded to full screen
onGanttLayoutReadyFires after the Gantt layout is ready, but before it is rendered
onGanttReadyFires after the dhtmlxGantt initialization is complete but the Gantt chart is not rendered on the page yet
onGanttRenderFires after the Gantt chart was rendered on the page
onGanttScrollFires when the Gantt chart is scrolled to a particular point
onGridHeaderClickFires when the user clicks on the grid's header
onGridResizeFires when the user is dragging the grid's border to resize the grid
onGridResizeEndFires after the user finished dragging the grid's border to resize the grid
onGridResizeStartFires before the user starts to drag the grid's border to resize the grid
onLightboxFires after the user has opened the lightbox (edit form)
onLightboxButtonFires when the user clicks on a custom button in the lightbox
onLightboxCancelFires when the user clicks on the 'Cancel' button in the lightbox
onLightboxChangeFires when the structure of the lightbox is changed
onLightboxDeleteFires when the user clicks on the 'Delete' button in the lightbox
onLightboxSaveFires when the user clicks on the 'Save' button in the lightbox
onLinkClickFires when the user clicks on a link
onLinkCreatedFires when a user creates a new link between tasks
onLinkDblClickFires when the user double clicks on a link
onLinkIdChangeFires when the id of a link is changed
onLinkValidationFires when the user adds a new link and dhtmlxGantt checks whether the link is valid
onLoadEndFires after loading data from the data source has been completed
onLoadStartFires immediately before loading data from the data source has been started
onMouseMoveFires when the mouse is moved over the gantt container
onMultiSelectFires after selection of a task or a range of tasks has been completed
onOptionsLoadFires after a collection of options has been loaded from the server, but isn't parsed yet
onParseFires after data was parsed (became available for API) but before it was rendered in the Gantt chart
onQuickInfoFires when the pop-up edit form appears
onRowDragEndFires after the user drops a vertically reordered row in the grid
onRowDragStartFires before the user drags a row of the grid to vertically reorder it
onRowResizeFires when the user is dragging the border of the row to resize the row height
onScaleAdjustedFires when the scale is re-rendered in order to display all tasks completely
onScaleClickFires when the user clicks on the cell in the time scale
onTaskClickFires when the user clicks on a task row in the grid area (including the 'expand/collapse' and 'add task' buttons) or on a task bar in the timeline area
onTaskClosedFires when a branch has been closed
onTaskCreatedFires when a user creates a new task by pressing the'+' button in a grid, or when the createTask method is called
onTaskDblClickFires when the user double clicks on a task
onTaskDragFires when the user drags a task
onTaskIdChangeFires when the id of a task is changed
onTaskLoadingFires when a task is being loaded from the data source
onTaskMultiSelectFires after the task selection state has changed (the task has been selected/unselected)
onTaskOpenedFires when a branch has been opened
onTaskRowClickFires when the user clicks on a row in the table
onTaskSelectedFires when the user selects a task
onTaskUnselectedFires when the user unselects a task by selecting some other task
onTemplatesReadyFires when the dhtmlxGantt templates are initialized

Gantt templates

NameDescription
baseline_textSpecifies the text displayed inside the baseline element
date_gridSpecifies the content of columns that show dates (return Date values) in grid
drag_link_classSpecifies the CSS class that will be applied to the pop-up that appears when a user drags a link
drag_linkSpecifies the text of tooltips that are displayed when the user creates a new dependency link
format_dateConverts a date object to a date string. Used to send data back to the server
grid_blankSpecifies the custom content inserted before the labels of child items in the tree column
grid_date_formatSpecifies the format of dates for the columns that show dates (return the Date values)
grid_fileSpecifies the icon of child items in the tree column
grid_folderSpecifies the icon of parent items in the tree column
grid_header_classSpecifies the CSS class that will be applied to the headers of the table's columns
grid_indentSpecifies the indent of the child items in a branch (in the tree column)
grid_openSpecifies the icon of the open/close sign in the tree column
grid_row_classSpecifies the CSS class that will be applied to a grid row
histogram_cell_allocatedDefines the height of the filled area in the resourceHistogram
histogram_cell_capacitySpecifies the height of the line that defines the available capacity of the resource
histogram_cell_classDefines the CSS class which is applied to a cell of the resource panel
histogram_cell_labelDefines the label inside a cell
leftside_textSpecifies the text assigned to tasks bars on the left side
lightbox_headerSpecifies the lightbox's header
link_classSpecifies the CSS class that will be applied to a link
link_descriptionSpecifies the text in the header of the link's "delete" confirm window
marker_classSpecifies the CSS class that will be applied to markers
parse_dateConverts date string into a Date object
progress_textSpecifies the text in the completed part of the task bar
quick_info_classSpecifies the CSS class that will be applied to the pop-up edit form
quick_info_contentSpecifies the content of the pop-up edit form
quick_info_dateSpecifies the date of the pop-up edit form
quick_info_titleSpecifies the title of the pop-up edit form
resource_cell_classDefines the CSS class names of cells in the resource timeline cells
resource_cell_valueDefines the HTML content of resource timeline cells
rightside_textSpecifies the text assigned to tasks bars on the right side
scale_cell_classSpecifies the CSS class that will be applied to cells of the time scale of the timeline area
scale_row_classSpecifies the CSS class that will be applied to the time scale
task_classSpecifies the CSS class that will be applied to task bars
task_dateSpecifies the date format of the label in the 'Time period' section of the lightbox
task_end_dateSpecifies the format for the end dates of tasks in the lightbox
task_row_classSpecifies the CSS class that will be applied to the row of the timeline area
task_textSpecifies the text in the task bars and the header of the lightbox
task_timeSpecifies the date period in the header of the lightbox
task_unscheduled_timeSpecifies the dates of unscheduled tasks
timeline_cell_classSpecifies the CSS class that will be applied to the cells of the timeline area
timeline_cell_contentSpecifies custom HTML content in the timeline cells
time_pickerSpecifies the format of the drop-down time selector in the lightbox
tooltip_date_formatSpecifies the format of start and end dates displayed in the tooltip
tooltip_textSpecifies the text of tooltips
xml_dateA string from an XML file is converted into a date object in conformity with this template
xml_formatA date object is converted into a string in conformity with this template. Used to send data back to the server

Gantt others

NameDescription
$clickRedefines the default click behavior for buttons of the Gantt chart
GanttA factory object that can be used to create new instances of dhtmlxGantt chart
ajaxGantt ajax module
calendarThe interface of the working calendar object
configDefines configuration options for dates, scale, controls
constantsStores various constants to reduce the use of magic numbers in the code
dataprocessorA set of dataprocessor methods
datastoreA set of datastore methods
dateA set of date formatting methods
envA set of flags which describe current environment
extAn object that stores various extensions
form_blocksAn object of the lightbox controls
i18nA set of methods for Gantt chart localization
ignore_timeHides a time unit in the time scale
jsonSpecifies JSON serialization and parsing
keysDefines the hot keys for the Gantt chart
licenseReturns the license name of dhtmlxGantt
localeThe current locale object (region-specific labels) of the Gantt chart
oldxmlSpecifies serialization and parsing in the XML format of dhtmlxGantt 1.0
skinReturns the current skin of the Gantt chart
skinsReturns objects of the available skins
templatesDefines formatting templates for dates, titles, tooltips in the Gantt chart
treeDatastoreA set of treeDatastore methods
utilsVarious helper modules
versionReturns the version of dhtmlxGantt
xmlSpecifies XML serialization and parsing