Skip to main content

Methods overview

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