API overview
Gantt methods
| Name | Description |
|---|---|
| Promise | Promise object constructor |
| addCalendar | Adds a calendar into Gantt |
| addLink | Adds a new dependency link |
| addLinkLayer | Displays an additional layer with custom elements for a link in the timeline area |
| addMarker | Adds a marker to the timeline area |
| addShortcut | Adds a new keyboard shortcut |
| addTask | Adds a new task |
| addTaskLayer | Displays an additional layer with custom elements for a task in the timeline area |
| adjustTaskHeightForBaselines | Adjusts the task's row height for proper display of baseline elements |
| alert | Calls an alert message box |
| assert | If the specified expression is false, an errorMessage is shown in the red popup at the top right corner of the screen |
| attachEvent | Attaches the handler to an inner event of dhtmlxGantt |
| autoSchedule | Recalculates the schedule of the project |
| batchUpdate | Updates multiple tasks/links at once |
| bind | Creates a new function that, when called, has its this keyword set to the provided value |
| calculateDuration | Calculates the duration of a task |
| calculateEndDate | Calculates the end date of a task |
| calculateTaskLevel | Calculates the level of nesting of a task |
| callEvent | Calls an inner event |
| changeLightboxType | Repaints the lighbox for the task according to its type |
| changeLinkId | Changes the link's id |
| changeTaskId | Changes the task's id |
| checkEvent | Checks whether an event has some handler(s) specified |
| clearAll | Removes all tasks and additional elements (including markers) from the Gantt chart |
| clearRedoStack | Clears the stack of stored redo commands |
| clearUndoStack | Clears the stack of stored undo commands |
| close | Closes the branch with the specified id |
| collapse | Collapses gantt from the full screen mode to the normal mode |
| columnIndexByDate | Returns the index of the column by the date |
| confirm | Calls a confirm message box |
| copy | Creates a deep copy of provided object |
| correctTaskWorkTime | Recalculates the task duration in the work time |
| createCalendar | Creates a working calendar |
| createDataProcessor | Creates a new dataProcessor instance and attaches it to gantt |
| createDatastore | Creates a datastore according to the provided configuration |
| createTask | Adds a new task and opens the lightbox to confirm |
| dataProcessor | DataProcessor constructor |
| dateFromPos | Gets the date of the specified horizontal position in the chart area |
| defined | Returns false if the provided argument is undefined, otherwise true |
| deleteCalendar | Deletes a task calendar by its id |
| deleteLink | Deletes the specified dependency link |
| deleteMarker | Deletes the specified marker |
| deleteTask | Deletes the specified task |
| destructor | Destroys the gantt instance |
| detachAllEvents | Detaches all events from dhtmlxGantt (both custom and inner ones) |
| detachEvent | Detaches a handler from an event (which was attached before by the attachEvent() method |
| eachParent | Iterates over all parent tasks of the specified task in the Gantt chart |
| eachSelectedTask | Iterates over all selected tasks in the Gantt chart |
| eachTask | Iterates over all child tasks of a specific task or the of whole Gantt chart |
| event | Attaches an event handler to an HTML element |
| eventRemove | Removes an event handler from an HTML element |
| expand | Expands gantt to the full screen mode |
| exportToExcel | Exports data from the Gantt chart to an Excel document |
| exportToICal | Exports data from the Gantt chart to an iCal string |
| exportToJSON | Exports the structure and data of a Gantt chart into a JSON object |
| exportToMSProject | Exports data from the Gantt chart to MS Project |
| exportToPDF | Exports a Gantt chart into the PDF format |
| exportToPNG | Exports a Gantt chart into the PNG format |
| exporttoprimaverap6 | Exports data from the Gantt chart to Primavera P6 |
| findCycles | Returns all dependency loops in the chart |
| focus | Sets focus on the gantt |
| getCalendar | Gets worktime calendar by id |
| getCalendars | Gets all the calendars added into Gantt |
| getChildren | Returns the 1st-level child tasks of the specified parent branch |
| getClosestWorkTime | Returns the closest working time |
| getColumnIndex | Returns the index of the column by its name |
| getConnectedGroup | Returns all tasks and links that a task is connected with |
| getConstraintLimitations | Returns the earliest and latest dates allowed by the constraint applied to a task |
| getConstraintType | Returns the constraint type applied to the task |
| getDatastore | Returns the configuration object of a datastore |
| getFreeSlack | Returns the free slack of a task |
| getGlobalTaskIndex | Gets the index of a task in the tree |
| getGridColumn | Gets the configuration object of a column |
| getGridColumns | Gets columns of the Gantt chart |
| getLabel | Gets the label of a select control in the lightbox |
| getLastSelectedTask | Returns the id of the last selected task |
| getLayoutView | Returns the object of the layout view by its name |
| getLightbox | Gets the lightbox's HTML object element |
| getLightboxSection | Returns the object of the lightbox's section |
| getLightboxType | Returns the name of the active lighbox's structure |
| getLightboxValues | Returns values of the lightbox's sections |
| getLink | Returns the dependency link object by the specified id |
| getLinkCount | Returns the number of all dependency links presented in the Gantt chart |
| getLinkNode | Returns the HTML element of the specified dependency link |
| getLinks | Returns all links presented in the Gantt chart |
| getMarker | Gets the marker's object |
| getNext | Returns the id of the next item (no matter what the level of nesting is: the same or different) |
| getNextSibling | Returns the id of the next task of the same level |
| getParent | Returns the id of the parent task |
| getPrev | Returns the id of the previous item (no matter what the level of nesting is: the same or different) |
| getPrevSibling | Returns the id of the previous task of the same level |
| getRedoStack | Returns the stack of stored redo user actions |
| getResourceAssignments | Returns all tasks assigned to the resource |
| getResourceCalendar | Returns a calendar which the resource is assigned to |
| getScale | Returns the configuration of the time scale |
| getScrollState | Returns the scroll position |
| getSelectedId | Returns the id of the selected task |
| getSelectedTasks | Returns an array of the currently selected tasks |
| getShortcutHandler | Gets a key navigation shortcut handler |
| getSiblings | Returns siblings of the specified task (including itself) |
| getSlack | Checks how much time (in the current duration unit) a task has before it starts to affect other tasks |
| getState | Gets the current state of the Gantt chart |
| getSubtaskDates | Calculates the combined start/end dates of tasks nested in a project or another task |
| getSubtaskDuration | Calculates the combined duration of tasks nested in a project or another task. |
| getTask | Returns the task object |
| getTaskAssignments | Returns the parsed resource assignments of a specific task from the datastore |
| getTaskBarHeight | Returns the height (in pixels) of the DOM element of the task |
| getTaskBaselines | Returns an array of baselines of a specific task from the datastore |
| getTaskBy | Finds a task by the specified criteria |
| getTaskByIndex | Returns a task by its global task index |
| getTaskByTime | Returns a collection of tasks which occur during the specified period |
| getTaskByWBSCode | Returns a task by its WBS code |
| getTaskCalendar | Gets a calendar assigned to the specified task (a task level calendar) |
| getTaskCount | Gets the number of tasks that are currently loaded in the gantt |
| getTaskHeight | Returns the visible height of a task |
| getTaskIndex | Gets the index of a task in the branch |
| getTaskNode | Returns the HTML element of the task bar |
| getTaskPosition | Calculates the position and size of the task's DOM element in the timeline area |
| getTaskResources | Returns the array of unique resources assigned to a specific task from the datastore |
| getTaskRowNode | Returns the HTML element of the task row in the table |
| getTaskTop | Gets the top position of the task's DOM element in the timeline area |
| getTaskType | Returns the type of a task |
| getTotalSlack | Returns the total slack of a task |
| getUndoStack | Returns the stack of stored undo user actions |
| getVisibleTaskCount | Gets the number of tasks visible on the screen (those that are not collapsed) |
| getWBSCode | Returns the WBS code (the outline number) of a task |
| getWorkHours | Returns the working hours of the specified date |
| groupBy | Groups tasks by the specified task's attribute |
| hasChild | Returns the number of child task(s) |
| hideCover | Hides the lightbox modal overlay that blocks interactions with the remaining screen |
| hideLightbox | Closes the lightbox if it's currently active |
| hideQuickInfo | Hides the pop-up task form (if it's currently active) |
| importFromExcel | Converts an Excel file to JSON |
| importFromMSProject | Converts an XML or MPP MS Project file to JSON |
| importfromprimaverap6 | Converts an XML or XER Primavera P6 file to JSON |
| init | Initializes a dhtmlxGantt inside a container |
| isChildOf | Checks whether a task is a child of a different task |
| isCircularLink | Checks whether the link is circular |
| isCriticalLink | Checks whether the specified link is critical |
| isCriticalTask | Checks whether the specified task is critical |
| isLinkAllowed | Checks whether the specified link is correct |
| isLinkExists | Checks whether the specified link exists |
| isReadonly | Checks whether the specified task/link, or the whole Gantt is read-only |
| isSelectedTask | Checks whether the specified task is currently selected |
| isSplitTask | Checks whether the specified task is split |
| isSummaryTask | Checks whether the specified task is summary |
| isTaskExists | Checks whether the specified task exists |
| isTaskVisible | Checks whether the specifies task is currently rendered in the Gantt chart |
| isUnscheduledTask | Checks if the task is unscheduled |
| isWorkTime | Checks whether the specified date is working or not |
| load | Loads data to the gantt from an external data source |
| locate | Gets the id of a task from the specified HTML event |
| mergeCalendars | Merges several working calendars into one |
| message | Calls a message box of the specified type |
| mixin | Adds properties of the 'source' object into the 'target' object |
| modalbox | Calls a modalbox |
| moveTask | Moves a task to a new position |
| open | Opens the branch with the specified id |
| parse | Loads data from a client-side resource |
| plugins | Activates the specified extensions |
| posFromDate | Gets the relative horizontal position of the specified date in the chart area |
| redo | Applies the reverted changes to the gantt once again |
| refreshData | Refreshes data in the Gantt chart |
| refreshLink | Refreshes the specifies link |
| refreshTask | Refreshes the task and its related links |
| removeLinkLayer | Removes the specified layer related to a link |
| removeShortcut | Removes a keyboard shortcut |
| removeTaskLayer | Removes the specified layer related to a task |
| render | Renders the whole Gantt chart |
| renderMarkers | Updates all markers on the page |
| resetLayout | Rebuilds the Gantt layout using the current value of the layout config |
| resetLightbox | Removes the current lightbox's HTML object element |
| resetProjectDates | Re-calculates the duration of a project task depending on the dates of its children |
| resetSkin | Re-calculates the skin's settings from the related attached skin CSS file |
| resizeLightbox | Forces the lightbox to resize |
| roundDate | Rounds the specified date to the nearest date in the time scale |
| roundTaskDates | Rounds the start and end task's dates to the nearest dates in the time scale |
| scrollLayoutCell | Scrolls the layout view to the specified position |
| scrollTo | Scrolls the Gantt container to the specified position |
| selectTask | Selects the specified task |
| serialize | Serializes the data into JSON or XML format |
| serverList | Returns a list of options |
| setParent | Set the parent for a task |
| setSizes | Resizes the Gantt chart |
| setSkin | Sets the active skin |
| setWorkTime | Sets the working time for the Gantt chart |
| showCover | Shows the lightbox modal overlay that blocks interactions with the remaining screen |
| showDate | Scrolls the chart area to makes the specified date visible |
| showLightbox | Opens the lightbox for the specified task |
| showQuickInfo | Displays the pop-up task form for the specified task |
| showTask | Makes the specified task visible on the screen |
| silent | Makes all code inside it not to trigger internal events or server-side calls |
| sort | Sorts tasks in the grid |
| toggleTaskSelection | Selects the specified task if it was unselected and vice versa |
| uid | Returns a unique id |
| undo | Reverts the changes made in the gantt |
| unselectTask | Removes selection from the selected task |
| unsetWorkTime | Unsets a working time in the Gantt Chart |
| updateCollection | Updates the specified collection with new options |
| updateLink | Updates the specified dependency link |
| updateMarker | Updates the specified marker |
| updateTask | Updates the specified task |
| updateTaskAssignments | Updates the resource property of the task object with the values of the resource assignments from the datastore |
Gantt properties
| Name | Description |
|---|---|
| auto_scheduling_compatibility | Disables usage of time contraints for tasks |
| auto_scheduling | Enables auto scheduling |
| auto_scheduling_descendant_links | Allows or forbids creating links from parent tasks (projects) to their children |
| auto_scheduling_initial | Defines whether gantt will do autoscheduling on data loading/parsing |
| auto_scheduling_move_projects | Defines whether the whole project will be moved (see the details below) |
| auto_scheduling_project_constraint | Defines whether tasks should inherit the constraint type from their parent project |
| auto_scheduling_strict | Enables the auto scheduling mode, in which tasks will always be rescheduled to the earliest possible date |
| auto_scheduling_use_progress | Sets the way the scheduling algorithms process completed tasks |
| auto_types | Automatically converts tasks with subtasks to projects and projects without subtasks back to tasks |
| autofit | Enables automatic adjusting of the grid's columns to the grid's width |
| autoscroll | Enables autoscrolling while dragging a task or a link out of the current browser screen |
| autoscroll_speed | Defines the speed of autoscrolling (in ms) while dragging a task or link out of the current browser screen |
| autosize | Forces the Gantt chart to automatically change its size to show all tasks without scrolling |
| autosize_min_width | Sets the minimum width (in pixels) that the Gantt chart can take in the horizontal 'autosize' mode |
| bar_height | Sets the height of task bars in the timeline area |
| bar_height_padding | Adjusts the padding around task bars in the timeline when bar_height is set to "full" |
| baselines | Configures the functionality of baselines in the Gantt chart |
| branch_loading | Enables dynamic loading in the Gantt chart |
| branch_loading_property | Specifies that the task has children that are not yet loaded from the backend |
| buttons_left | Stores a collection of buttons resided in the left bottom corner of the lightbox |
| buttons_right | Stores a collection of buttons resided in the right bottom corner of the lightbox |
| calendar_property | Changes the name of the property that affects binding of a calendar to a task/group of tasks |
| cascade_delete | Enables cascade deleting of nested tasks and links |
| click_drag | Enables advanced drag-n-drop |
| columns | Configures the columns of the table |
| constraint_types | Contains all available constraint types |
| container_resize_method | Defines whether the gantt should track resizing of the container at time intervals |
| container_resize_timeout | Specifies the delay (in milliseconds) before redrawing the gantt when resizing the container |
| correct_work_time | Enables adjusting the task's start and end dates to the work time (while dragging) |
| csp | Defines internal implementation of the code of date formatting methods |
| date_format | Sets the date format that is used to parse data from a data set and to send dates back to the server |
| date_grid | Sets the format of dates in the "Start time" column of the table |
| date_scale | Sets the format of the time scale (X-Axis) |
| deadlines | Enables or disables the display of deadline elements for tasks |
| deepcopy_on_parse | Defines 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_lightbox | Enables the possibility to drag the lightbox by the header |
| drag_links | Enables creating dependency links by drag-and-drop |
| drag_mode | Stores the types of available drag-and-drop modes |
| drag_move | Enables the possibility to move tasks by drag-and-drop |
| drag_multiple | Enables the possibility to drag several selected tasks at once |
| drag_progress | Enables the possibility to change the task progress by dragging the progress knob |
| drag_project | Enables drag and drop of items of the project type |
| drag_resize | Enables the possibility to resize tasks by drag-and-drop |
| drag_timeline | Configures the behavior of the drag_timeline extension |
| duration_step | Sets the number of 'gantt.config.duration_unit' units that will correspond to one unit of the 'duration' data property. |
| duration_unit | Sets the duration unit |
| dynamic_resource_calendars | Enables automatic merging of multiple resource calendars into one |
| editable_property | Changes the name of a property that affects the editing ability of tasks/links in the read-only Gantt chart |
| editor_types | An object that contains definitions of inline editors |
| end_date | Sets the end value of the time scale |
| external_render | Renders 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_columns | Adjusts the width of columns inside a scrollable grid |
| grid_resize | Makes the grid resizable by dragging the right grid's border |
| grid_resizer_attribute | Sets the name of the attribute of the grid resizer's DOM element |
| grid_resizer_column_attribute | Sets the name of the attribute of the column resizer's DOM element. The attribute presents the column's index |
| grid_width | Sets the width of the grid |
| highlight_critical_path | Shows the critical path in the chart |
| horizontal_scroll_key | Enables/disables horizontal scroll by the Shift |
| inherit_calendar | Defines whether tasks should inherit work calendars from their summary parents |
| inherit_scale_class | Specifies whether sub-scales shall use the scale_cell_class template by default |
| initial_scroll | Sets whether the timeline area will be initially scrolled to display the earliest task |
| inline_editors_date_processing | Keeps the duration of a task unchanged during editing of the start/end of a task |
| inline_editors_multiselect_open | Defines 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_navigation | Enables keyboard navigation in gantt |
| keyboard_navigation_cells | Enables keyboard navigation by cells |
| layer_attribute | Sets the name of the attribute of the task layer's DOM element |
| layout | Specifies the layout object |
| lightbox | Specifies the lightbox object |
| lightbox_additional_height | Increases the height of the lightbox |
| link_arrow_size | Sets the size of the link arrow |
| link_attribute | Sets the name of the attribute that will specify the id of the link's HTML element |
| link_line_width | Sets the width of dependency links in the timeline area |
| link_radius | Sets the radius for rounding corners of link lines in the timeline |
| link_wrapper_width | Sets the width of the area (over the link) sensitive to clicks |
| links | Stores the types of links dependencies |
| min_column_width | Sets the minimum width for a column in the timeline area |
| min_duration | Sets the minimum duration (in milliseconds) that can be set for a task during resizing. |
| min_grid_column_width | Sets the minimal width for each grid column (in pixels) while resizing grid |
| min_task_grid_row_height | Sets the minimal row height that can be set for a task during resizing |
| multiselect | Enables/disables multi-task selection in the Gantt chart |
| multiselect_one_level | Specifies whether multi-task selection will be available within one or any level |
| open_split_tasks | Enables the possibility to expand/collapse split tasks by clicking the +/- button |
| open_tree_initially | Openes all branches initially |
| order_branch | Activates the 'branch' mode that allows vertically reordering tasks within the same tree level |
| order_branch_free | Activates the 'branch' mode that allows reordering tasks within the whole gantt |
| placeholder_task | Adds an empty row into the end of the list of tasks to simplify tasks editing via keyboard |
| preserve_scroll | Preserves the current position of the vertical and horizontal scrolls while re-drawing the gantt chart |
| prevent_default_scroll | Specifies whether the gantt container should block the mousewheel event, or should it be propagated up to the window element |
| process_resource_assignments | Enables/disables parsing of the resource assignments |
| project_end | Specifies the end date of a project |
| project_start | Specifies the start date of a project |
| quick_info_detached | Defines whether the task form will appear from the left/right side of the screen or near the selected task |
| quickinfo_buttons | Stores a collection of buttons resided in the pop-up task's details form |
| readonly | Activates the read-only mode for the Gantt chart |
| readonly_property | Changes the name of a property that affects the read-only behaviour of tasks/links |
| redo | Enables the Redo functionality for the gantt |
| reorder_grid_columns | Enables the possibility to reorder grid columns by drag and drop |
| resize_rows | Enables the ability to adjust the row height by drag-and-drop |
| resource_assignment_store | Specifies the name of the dataStore which stores resource assignments |
| resource_attribute | Changes the name of the attribute that Gantt uses to find which resource the task row in the resource grid/timeline is referring to |
| resource_calendars | Defines a set of working calendars that can be assigned to a specific resource, e.g. a user |
| resource_property | Defines the property of a task object that stores a resource id associated with resourceGrid/Timeline/Histogram/Calendar |
| resource_render_empty_cells | Tells the resource timeline to render elements and call templates for non-allocated cells |
| resource_store | Specifies the name of the dataStore connected to the resourceGrid/resourceTimeline/resourceHistogram views |
| resources | Defines an extra configuration for the resource store |
| root_id | Sets the id of the virtual root element |
| round_dnd_dates | Enables rounding the task's start and end dates to the nearest scale marks |
| row_height | Sets the default height for rows of the table |
| rtl | Switches gantt to the right-to-left mode |
| scale_height | Sets the height of the time scale and the header of the grid |
| scale_offset_minimal | Sets the minimal scale unit (in case multiple scales are used) as the interval of the leading/closing empty space |
| scale_unit | Sets the unit of the time scale (X-Axis) |
| scales | Defines configuration settings of the time scale |
| schedule_from_end | Enables backward scheduling |
| scroll_on_click | Specifies whether the timeline area shall be scrolled while selecting to display the selected task |
| scroll_size | Set the sizes of the vertical (width) and horizontal (height) scrolls |
| select_task | Enables selection of tasks in the Gantt chart |
| server_utc | Enables converting server-side dates from UTC to a local time zone (and backward) while sending data to the server |
| show_chart | Shows the chart (timeline) area of the Gantt chart |
| show_empty_state | Defines whether to display the placeholder element inside the grid when it is empty |
| show_errors | Enables showing error alerts in case of unexpected behavior |
| show_grid | Shows the grid area of the Gantt chart |
| show_links | Enables/disables displaying links in the Gantt chart |
| show_markers | Shows/hides markers on the page |
| show_progress | Enables displaying of the progress inside the task bars |
| show_quick_info | Activates/disables the 'quick_info' extension (pop-up task's details form) |
| show_task_cells | Enables/disables displaying column borders in the chart area |
| show_tasks_outside_timescale | Enables showing tasks that are outside the specified date range in the Gantt chart |
| show_unscheduled | Enables showing unscheduled tasks |
| skip_off_time | Hides non-working time from the time scale |
| smart_rendering | Enables the smart rendering mode for gantt's tasks and links rendering |
| smart_scales | Specifies that only visible part of the time scale is rendered on the screen |
| sort | Enables sorting in the table |
| start_date | Sets the start value of the time scale |
| start_on_monday | Sets the starting day of the week |
| static_background | Generates a background image for the timeline area instead of rendering actual columns' and rows' lines |
| static_background_cells | Enables rendering of highlighted cells in the static_background mode |
| step | Sets the step of the time scale (X-Axis) |
| task_attribute | Sets the name of the attribute that will specify the id of the task's HTML element |
| task_date | Sets the format of the date label in the 'Time period' section of the lightbox |
| task_grid_row_resizer_attribute | Sets the name of the attribute of the resizer's DOM element of the grid row. The attribute presents the row's index |
| task_height | Sets the height of task bars in the timeline area |
| task_scroll_offset | Sets the offset (in pixels) of the nearest task from the left border in the timeline |
| time_picker | Sets the format of the time drop-down selector in the lightbox |
| time_step | Sets the minimum step (in minutes) for the task's time values |
| timeline_placeholder | Shows the background grid in the empty timeline |
| tooltip_hide_timeout | Sets the length of time, in milliseconds, before the tooltip hides |
| tooltip_offset_x | Sets the right (if positive) offset of the tooltip's position |
| tooltip_offset_y | Sets the top (if positive) offset of the tooltip's position |
| tooltip_timeout | Sets the timeout in milliseconds before the tooltip is displayed for a task |
| touch | Enables/disables the touch support for the Gantt chart |
| touch_drag | Defines the time period in milliseconds that is used to differ the long touch gesture from the scroll gesture |
| touch_feedback | Returns vibration feedback before/after drag and drop on touch devices |
| touch_feedback_duration | Defines the duration of vibration feedback before/after drag and drop on touch devices (in milliseconds) |
| type_renderers | Redefines functions responsible for displaying different types of tasks |
| types | Stores the names of lightbox's structures (used for different types of tasks) |
| undo | Enables the Undo functionality for the gantt |
| undo_actions | Sets the actions that the Undo operation will revert |
| undo_steps | Sets the number of steps that should be reverted by the undo method |
| undo_types | Sets the types of entities for which the Undo operation will be applied |
| wai_aria_attributes | Enables WAI-ARIA support to make the component recognizable for screen readers |
| wheel_scroll_sensitivity | Specifies the speed of scrolling the gantt by the mouse wheel |
| wide_form | Sets both the section and its label on the same line |
| work_time | Enables calculating the duration of tasks in working time instead of calendar time |
| xml_date | Defines date formats that are used to parse data from a data set and to send data to a server |
Gantt events
| Name | Description |
|---|---|
| onAfterAutoSchedule | Fires when autoscheduling is done |
| onAfterBatchUpdate | Fires after the batchUpdate method was called |
| onAfterBranchLoading | If dynamic loading is enabled, fires after the task branch was loaded to the page |
| onAfterLightbox | Fires after the user has closed the lightbox (edit form) |
| onAfterLinkAdd | Fires after a new link is added to the Gantt chart |
| onAfterLinkDelete | Fires after the user deletes a link |
| onAfterLinkUpdate | Fires after the user updates a link |
| onAfterQuickInfo | Fires after the pop-up edit form is closed |
| onAfterRedo | Fires after the redo() method was called |
| onAfterRowResize | Fires after resizing of the row height is finished |
| onAfterSort | Fires after tasks are sorted in the grid |
| onAfterTaskAdd | Fires after the user adds a task to the Gantt chart |
| onAfterTaskAutoSchedule | Fires for each task which has been autoscheduled |
| onAfterTaskDelete | Fires after the user deletes a task |
| onAfterTaskDrag | Fires after the user has finished to drag and released the mouse button |
| onAfterTaskMove | Fires after a task was moved to a new vertical position |
| onAfterTaskUpdate | Fires after the user updates a task |
| onAfterUndo | Fires after the undo() method was called |
| onAjaxError | Fires if the server returns an error |
| onAutoScheduleCircularLink | Fires if some dependency loops were found during auto scheduling |
| onBeforeAutoSchedule | Fires before auto scheduling |
| onBeforeBatchUpdate | Fires before the batchUpdate method is called |
| onBeforeBranchLoading | If dynamic loading is enabled, fires after a user expands the task branch but before loading starts |
| onBeforeCollapse | Before gantt exits the fullscreen mode and goes back to normal mode |
| onBeforeDataRender | Fires before data is rendered on the page |
| onBeforeExpand | Fires before gantt is expanded to full screen |
| onBeforeGanttReady | Fires before the dhtmlxGantt initialization is started |
| onBeforeGanttRender | Fires before the Gantt chart is rendered on the page |
| onBeforeLightbox | Fires immediately before the user opens the lightbox (edit form) |
| onBeforeLinkAdd | Fires before a new link is added to the Gantt chart |
| onBeforeLinkDelete | Fires before the user deletes a link |
| onBeforeLinkDisplay | Fires after the links have been loaded to the Gantt chart but before they are displayed |
| onBeforeLinkUpdate | Fires before a link is updated |
| onBeforeMultiSelect | Fires before selecting a task or a range of tasks |
| onBeforeParse | Fires before data started to be parsed |
| onBeforeRedo | Fires before the redo() method is called |
| onBeforeRedoStack | Fires before an action is added into the redo stack |
| onBeforeRollupTaskDisplay | Fires before the rollup task is displayed on its parent project |
| onBeforeRowDragEnd | Fires when a user drops a row in the grid |
| onBeforeRowDragMove | Fires before a row of the grid is dragged vertically to a different position |
| onBeforeRowResize | Fires before the user starts to resize the row height by drag-and-drop |
| onBeforeRowResizeEnd | Fires before resizing of the row height is completed |
| onBeforeSplitTaskDisplay | Fires before a part of the split task is displayed on the Gantt chart |
| onBeforeTaskAdd | Fires before a new task is added to the Gantt chart |
| onBeforeTaskAutoSchedule | Fires for each task which is rescheduled |
| onBeforeTaskChanged | Fires after the user has finished dragging and released the mouse button but before the changes are applied |
| onBeforeTaskDelete | Fires before the user deletes a task |
| onBeforeTaskDisplay | Fires after the tasks have been loaded to the Gantt chart, but before they are displayed |
| onBeforeTaskDrag | Fires after the user has pressed the mouse button and started dragging, but before dhtmlxGantt starts the drag-and-drop operation |
| onBeforeTaskMove | Fires before a task is moved to a new vertical position |
| onBeforeTaskMultiSelect | Fires before the task selection state is being changed (the task is being selected or unselected) |
| onBeforeTaskSelected | Fires before the user selects a task |
| onBeforeTaskUpdate | Fires before the user updates a task |
| onBeforeUndo | Fires before the undo() method is called |
| onBeforeUndoStack | Fires before an action is added into the undo stack |
| onCircularLinkError | Fires when the circular reference has been detected and auto scheduling is not possible |
| onClear | Fires after all tasks were removed from the Gantt chart by the clearAll method |
| onCollapse | Fires when gantt went back to normal mode from the full screen mode |
| onColumnResize | Fires when the user is dragging the column's border to resize the column |
| onColumnResizeEnd | Fires after the user finished dragging the column's border to resize the column |
| onColumnResizeStart | Fires before the user starts to drag the column's border to resize the column |
| onContextMenu | Fires when a user clicks the right mouse button inside the Gantt chart (see the details) |
| onDataProcessorReady | Fires on the dp.init(gantt) call |
| onDataRender | Fires after data has been rendered on the page |
| onDestroy | Called after gantt has been cleared by the destructor method |
| onEmptyClick | Fires when the user clicks on an empty space in the Gantt chart (not on tasks) |
| onError | Fires when assert receives 'false' value, i.e. when assertion fails |
| onExpand | Fires when gantt is expanded to full screen |
| onGanttLayoutReady | Fires after the Gantt layout is ready, but before it is rendered |
| onGanttReady | Fires after the dhtmlxGantt initialization is complete but the Gantt chart is not rendered on the page yet |
| onGanttRender | Fires after the Gantt chart was rendered on the page |
| onGanttScroll | Fires when the Gantt chart is scrolled to a particular point |
| onGridHeaderClick | Fires when the user clicks on the grid's header |
| onGridResize | Fires when the user is dragging the grid's border to resize the grid |
| onGridResizeEnd | Fires after the user finished dragging the grid's border to resize the grid |
| onGridResizeStart | Fires before the user starts to drag the grid's border to resize the grid |
| onLightbox | Fires after the user has opened the lightbox (edit form) |
| onLightboxButton | Fires when the user clicks on a custom button in the lightbox |
| onLightboxCancel | Fires when the user clicks on the 'Cancel' button in the lightbox |
| onLightboxChange | Fires when the structure of the lightbox is changed |
| onLightboxDelete | Fires when the user clicks on the 'Delete' button in the lightbox |
| onLightboxSave | Fires when the user clicks on the 'Save' button in the lightbox |
| onLinkClick | Fires when the user clicks on a link |
| onLinkCreated | Fires when a user creates a new link between tasks |
| onLinkDblClick | Fires when the user double clicks on a link |
| onLinkIdChange | Fires when the id of a link is changed |
| onLinkValidation | Fires when the user adds a new link and dhtmlxGantt checks whether the link is valid |
| onLoadEnd | Fires after loading data from the data source has been completed |
| onLoadStart | Fires immediately before loading data from the data source has been started |
| onMouseMove | Fires when the mouse is moved over the gantt container |
| onMultiSelect | Fires after selection of a task or a range of tasks has been completed |
| onOptionsLoad | Fires after a collection of options has been loaded from the server, but isn't parsed yet |
| onParse | Fires after data was parsed (became available for API) but before it was rendered in the Gantt chart |
| onQuickInfo | Fires when the pop-up edit form appears |
| onRowDragEnd | Fires after the user drops a vertically reordered row in the grid |
| onRowDragStart | Fires before the user drags a row of the grid to vertically reorder it |
| onRowResize | Fires when the user is dragging the border of the row to resize the row height |
| onScaleAdjusted | Fires when the scale is re-rendered in order to display all tasks completely |
| onScaleClick | Fires when the user clicks on the cell in the time scale |
| onTaskClick | Fires 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 |
| onTaskClosed | Fires when a branch has been closed |
| onTaskCreated | Fires when a user creates a new task by pressing the'+' button in a grid, or when the createTask method is called |
| onTaskDblClick | Fires when the user double clicks on a task |
| onTaskDrag | Fires when the user drags a task |
| onTaskIdChange | Fires when the id of a task is changed |
| onTaskLoading | Fires when a task is being loaded from the data source |
| onTaskMultiSelect | Fires after the task selection state has changed (the task has been selected/unselected) |
| onTaskOpened | Fires when a branch has been opened |
| onTaskRowClick | Fires when the user clicks on a row in the table |
| onTaskSelected | Fires when the user selects a task |
| onTaskUnselected | Fires when the user unselects a task by selecting some other task |
| onTemplatesReady | Fires when the dhtmlxGantt templates are initialized |
Gantt templates
| Name | Description |
|---|---|
| baseline_text | Specifies the text displayed inside the baseline element |
| date_grid | Specifies the content of columns that show dates (return Date values) in grid |
| drag_link_class | Specifies the CSS class that will be applied to the pop-up that appears when a user drags a link |
| drag_link | Specifies the text of tooltips that are displayed when the user creates a new dependency link |
| format_date | Converts a date object to a date string. Used to send data back to the server |
| grid_blank | Specifies the custom content inserted before the labels of child items in the tree column |
| grid_date_format | Specifies the format of dates for the columns that show dates (return the Date values) |
| grid_file | Specifies the icon of child items in the tree column |
| grid_folder | Specifies the icon of parent items in the tree column |
| grid_header_class | Specifies the CSS class that will be applied to the headers of the table's columns |
| grid_indent | Specifies the indent of the child items in a branch (in the tree column) |
| grid_open | Specifies the icon of the open/close sign in the tree column |
| grid_row_class | Specifies the CSS class that will be applied to a grid row |
| histogram_cell_allocated | Defines the height of the filled area in the resourceHistogram |
| histogram_cell_capacity | Specifies the height of the line that defines the available capacity of the resource |
| histogram_cell_class | Defines the CSS class which is applied to a cell of the resource panel |
| histogram_cell_label | Defines the label inside a cell |
| leftside_text | Specifies the text assigned to tasks bars on the left side |
| lightbox_header | Specifies the lightbox's header |
| link_class | Specifies the CSS class that will be applied to a link |
| link_description | Specifies the text in the header of the link's "delete" confirm window |
| marker_class | Specifies the CSS class that will be applied to markers |
| parse_date | Converts date string into a Date object |
| progress_text | Specifies the text in the completed part of the task bar |
| quick_info_class | Specifies the CSS class that will be applied to the pop-up edit form |
| quick_info_content | Specifies the content of the pop-up edit form |
| quick_info_date | Specifies the date of the pop-up edit form |
| quick_info_title | Specifies the title of the pop-up edit form |
| resource_cell_class | Defines the CSS class names of cells in the resource timeline cells |
| resource_cell_value | Defines the HTML content of resource timeline cells |
| rightside_text | Specifies the text assigned to tasks bars on the right side |
| scale_cell_class | Specifies the CSS class that will be applied to cells of the time scale of the timeline area |
| scale_row_class | Specifies the CSS class that will be applied to the time scale |
| task_class | Specifies the CSS class that will be applied to task bars |
| task_date | Specifies the date format of the label in the 'Time period' section of the lightbox |
| task_end_date | Specifies the format for the end dates of tasks in the lightbox |
| task_row_class | Specifies the CSS class that will be applied to the row of the timeline area |
| task_text | Specifies the text in the task bars and the header of the lightbox |
| task_time | Specifies the date period in the header of the lightbox |
| task_unscheduled_time | Specifies the dates of unscheduled tasks |
| timeline_cell_class | Specifies the CSS class that will be applied to the cells of the timeline area |
| timeline_cell_content | Specifies custom HTML content in the timeline cells |
| time_picker | Specifies the format of the drop-down time selector in the lightbox |
| tooltip_date_format | Specifies the format of start and end dates displayed in the tooltip |
| tooltip_text | Specifies the text of tooltips |
| xml_date | A string from an XML file is converted into a date object in conformity with this template |
| xml_format | A date object is converted into a string in conformity with this template. Used to send data back to the server |
Gantt others
| Name | Description |
|---|---|
| $click | Redefines the default click behavior for buttons of the Gantt chart |
| Gantt | A factory object that can be used to create new instances of dhtmlxGantt chart |
| ajax | Gantt ajax module |
| calendar | The interface of the working calendar object |
| config | Defines configuration options for dates, scale, controls |
| constants | Stores various constants to reduce the use of magic numbers in the code |
| dataprocessor | A set of dataprocessor methods |
| datastore | A set of datastore methods |
| date | A set of date formatting methods |
| env | A set of flags which describe current environment |
| ext | An object that stores various extensions |
| form_blocks | An object of the lightbox controls |
| i18n | A set of methods for Gantt chart localization |
| ignore_time | Hides a time unit in the time scale |
| json | Specifies JSON serialization and parsing |
| keys | Defines the hot keys for the Gantt chart |
| license | Returns the license name of dhtmlxGantt |
| locale | The current locale object (region-specific labels) of the Gantt chart |
| oldxml | Specifies serialization and parsing in the XML format of dhtmlxGantt 1.0 |
| skin | Returns the current skin of the Gantt chart |
| skins | Returns objects of the available skins |
| templates | Defines formatting templates for dates, titles, tooltips in the Gantt chart |
| treeDatastore | A set of treeDatastore methods |
| utils | Various helper modules |
| version | Returns the version of dhtmlxGantt |
| xml | Specifies XML serialization and parsing |