GanttBase

A thin base class for Gantt. Does not include any features by default, allowing smaller custom-built bundles if used in place of Gantt.

Configs

225

Common

The file name of an image file to use when a resource has no image, or its image cannot be loaded.

dependencyIdField: String= 'id'

A task field (id, wbsCode, sequenceNumber etc) that will be used when displaying and editing linked tasks.

keyMap: Object<String, KeyMapConfig>

See Keyboard shortcuts for details

readOnly: Boolean= falseAlso a property

Configure as true to make the Gantt read-only, by disabling any UIs for modifying data.

Note that checks MUST always also be applied at the server side.

resourceImageFolderPath: Stringdeprecated

The path for resource images, used by various widgets such as the resource assignment column.

The path for resource images, used by various widgets such as the resource assignment column.

True to scroll the task bar into view when clicking a cell, you can also pass a scroll config object.

Specify as false to not show unscheduled tasks on the Gantt chart. Unscheduled tasks will be rendered as an icon

True to toggle the collapsed/expanded state when clicking a parent task bar.

columnsGridBase
dataGridBase
emptyTextGridBase
endDateTimelineBase
featuresGridBase
listenersEvents
maxDateTimelineBase
minDateTimelineBase
presetsTimelineViewPresets
rowHeightGridBase
startDateTimelineBase
storeGridBase
viewPresetTimelineViewPresets
visibleDateTimelineBase

Data

A ProjectModel instance or a config object. The project holds all Gantt data.

assignmentsGanttStores
calendarsGanttStores
dependenciesGanttStores
projectProgressReportingProjectProgressMixin
resourcesGanttStores
tasksGanttStores
taskStoreGanttStores
timeRangesGanttStores

Misc

showCostControls: Boolean= false

If set to true this will:

  • show cost, quantity and rate table columns on the task editor "Resources" tab
  • show "Rate table" columns in the assignment column editor picker
  • include "Cost" column in the "Add new..." column dropdown list
showTaskColorPickers: Boolean= false

If set to true this will show a color field in the TaskEdit editor and also a picker in the TaskMenu. Both enables the user to choose a color which will be applied to the task bar's background. See TaskModel's eventColor config.

cellEllipsisGridBase
columnLinesGridBase
dataFieldWidget
defaultRegionTimelineBase
destroyStoreGridBase
disabledWidget
enableDeleteKeyEventNavigation
enableStickyGridBase
enableUndoRedoKeysGridElementEvents
hideFootersGridBase
hideHeadersGridBase
hideRowHoverTimelineBase
hoverClsGridElementEvents
iconPanel
localeClassLocalizable
localizableLocalizable
longPressTimeGridElementEvents
maskDefaultsGridBase
maskedWidget
ownerWidget
pluginsPluggable
refWidget
responsiveLevelsGridResponsive
rippleWidget
rowLinesGridBase
showDirtyGridBase
tabWidget
timeZoneTimelineBase
titlePanel
tooltipWidget

Other

Set to true for sub tasks to inherit their parent´s eventColor

newTaskDefaults: TaskModelConfig | Object | function

A callback function or a set of name: value properties to apply on tasks created using the task context menu. Be aware that name value will be ignored since it's auto generated and may be configured with localization.

Example:

// Object form:
newTaskDefaults : {
   duration          : 3,
   manuallyScheduled : true,
   percentDone       : 15
}
// Function form:
newTaskDefaults : (targetRecord) => {
   return {
       duration          : targetRecord.duration,
       manuallyScheduled : targetRecord.manuallyScheduled
   }
}
Returns: TaskModelConfig | Object -

Set of properties to apply on tasks created using the task context menu

Configure UI transitions for various actions in the grid.

ParameterTypeDescription
insertRecordBoolean

Transition record insertions

removeRecordBoolean

Transition record removals

toggleColumnBoolean

Transition column visibility changes

expandCollapseColumnBoolean

Transition parent/group column expand/collapse

toggleRegionBoolean

Transition region expand/collapse

toggleTreeNodeBoolean

Transition tree node expand/collapse

toggleGroupBoolean

Transition group expand/collapse

filterRemovalBoolean

Transition row removals caused by filtering (under specific conditions)

removeEventBoolean

Transition task removals

changeEventBoolean

Transition task changes

columnWidget
defaultFocusContainer
drawerPanel
enableTransactionalFeaturesTransactionalFeatureMixin
labelPositionContainer
renditionContainer
rtlRTL
spanWidget
stateSettingsGridState

Scheduled events

Task color used by default. Tasks can specify their own eventColor, which will override this config.

For available standard colors, see EventColor.

Returns dates that will constrain resize and drag operations. The method will be called with the task being dragged.

ParameterTypeDescription
taskRecordTaskModel

The task record being moved or resized.

Returns: DateConstraint -

Constraining object containing start and end constraints. Omitting either will mean that end is not constrained. So you can prevent a resize or move from moving before a certain time while not constraining the end date.

taskRenderer: function

An empty function by default, but provided so that you can override it. This function is called each time a task is rendered into the gantt to render the contents of the task.

Returning a string will display it in the task bar, it accepts both plain text or HTML. It is also possible to return a DOM config object which will be synced to the task bars content.

You should never modify any records inside this method.
// using plain string
new Gantt({
   taskRenderer : ({ taskRecord }) => StringHelper.encodeHtml(taskRecord.name)
});

// using html string
new Gantt({
   taskRenderer : ({ taskRecord }) => StringHelper.xss`${taskRecord.id} <b>${taskRecord.name}</b>`
});

// using DOM config
new Gantt({
   taskRenderer({ taskRecord }) {
      return {
          tag  : 'b',
          html : StringHelper.encodeHtml(taskRecord.name)
      }
   }
});
ParameterTypeDescription
detailObject

An object containing the information needed to render a Task.

detail.taskRecordTaskModel

The task record.

detail.renderDataObject

An object containing details about the task rendering.

detail.renderData.clsDomClassList | String

An object whose property names represent the CSS class names to be added to the tasks's element. Set a property's value to truthy or falsy to add or remove the class name based on the property name. Using this technique, you do not have to know whether the class is already there, or deal with concatenation.

detail.renderData.styleString | Object<String, String>

Inline styles for the task bar DOM element. Use either 'border: 1px solid black' or { border: '1px solid black' }

detail.renderData.wrapperClsDomClassList | String

An object whose property names represent the CSS class names to be added to the event wrapper element. Set a property's value to truthy or falsy to add or remove the class name based on the property name. Using this technique, you do not have to know whether the class is already there, or deal with concatenation.

detail.renderData.iconClsDomClassList | String

An object whose property names represent the CSS class names to be added to a task icon element.

indicatorsTimeSpan[] | TimeSpanConfig[]

An array that can be populated with TimeSpan records or their config objects to have them rendered in the task row

Returns: String | DomConfig | DomConfig[] -

A simple string, or a DomConfig object defining the actual HTML

barMarginTimelineEventRendering
displayDateFormatTimelineViewPresets
enableRecurringEventsRecurringEvents
eventStyleTimelineEventRendering
fillTicksTimelineEventRendering
managedEventSizingTimelineEventRendering
snapTimelineDateMapper
tickSizeTimelineEventRendering

Accessibility

ariaLabelWidget

Conflict resolution

cycleResolutionPopupClassSchedulingIssueResolution
displaySchedulingIssueResolutionPopupSchedulingIssueResolution
schedulingIssueResolutionPopupClassSchedulingIssueResolution

Content

bbarPanel
defaultsContainer
footerPanel
headerPanel
itemsContainer
lazyItemsContainer
namedItemsContainer
stripsPanel
tbarPanel
textContentContainer
toolsPanel

CSS

bodyClsPanel
borderContainer
clsWidget
colorWidget
htmlClsWidget
itemClsContainer
styleWidget
uiPanel

Dates

timeResolutionTimelineDateMapper

DOM

adoptWidget
appendToWidget
contentWidget
datasetWidget
htmlWidget
idWidget
tagWidget

Float & align

alignWidget
anchorWidget
centeredWidget
draggableWidget
floatingWidget
xWidget
yWidget

Infinite scroll

bufferCoefTimelineScroll
bufferThresholdTimelineScroll
infiniteScrollTimelineScroll

Layout

alignSelfWidget
autoHeightGridBase
dockWidget
flexWidget
getRowHeightGridBase
heightWidget
hiddenWidget
hideWhenEmptyContainer
layoutContainer
layoutStyleContainer
marginWidget
maxHeightWidget
maxWidthWidget
minHeightGridBase
minWidthWidget
textAlignWidget
weightWidget
widthWidget

Masking

loadMaskLoadMaskable
loadMaskDefaultsLoadMaskable
loadMaskErrorLoadMaskable
syncMaskLoadMaskable

misc

tabBarItemsContainer

Record

recordContainer

Scrolling

scrollableGridBase

Selection

selectionModeGridSelection

State

stateIdState

Time axis

autoAdjustTimeAxisTimelineBase
forceFitTimelineBase
partnerTimelineBase
stickyHeadersTimelineBase
suppressFitTimelineBase
timeAxisTimelineBase
weekStartDayTimelineBase
workingTimeTimelineBase

Tree

Zoom

maxZoomLevelTimelineZoomable
minZoomLevelTimelineZoomable
visibleZoomFactorTimelineZoomable
zoomOnMouseWheelTimelineZoomable

Properties

214

Common

readOnly: Boolean= falseAlso a config

Configure as true to make the Gantt read-only, by disabling any UIs for modifying data.

Note that checks MUST always also be applied at the server side.

True to scroll the task bar into view when clicking a cell, you can also pass a scroll config object.

Specify as false to not show unscheduled tasks on the Gantt chart. Unscheduled tasks will be rendered as an icon

True to toggle the collapsed/expanded state when clicking a parent task bar.

columnsGridBase
dataGridBase
emptyTextGridBase
endDateTimelineBase
featuresGridFeatures
maxDateTimelineBase
minDateTimelineBase
presetsTimelineViewPresets
rowHeightGridBase
startDateTimelineBase
storeGridBase
subGridsGridSubGrids
viewPresetTimelineViewPresets
visibleDateTimelineBase

Class hierarchy

isGanttBase: Boolean= truereadonly
Identifies an object as an instance of GanttBase class, or subclass thereof.
isGanttBase: Boolean= truereadonlystatic
Identifies an object as an instance of GanttBase class, or subclass thereof.
isContainerContainer
isCrudManagerViewCrudManagerView
isDelayableDelayable
isEventNavigationEventNavigation
isEventsEvents
isGanttDomGanttDom
isGanttRegionsGanttRegions
isGanttScrollGanttScroll
isGanttStateGanttState
isGanttStoresGanttStores
isGridGrid
isGridBaseGridBase
isGridElementEventsGridElementEvents
isGridFeaturesGridFeatures
isGridResponsiveGridResponsive
isGridSelectionGridSelection
isGridStateGridState
isGridSubGridsGridSubGrids
isKeyMapKeyMap
isLoadMaskableLoadMaskable
isLocalizableLocalizable
isPanelPanel
isPluggablePluggable
isProjectProgressMixinProjectProgressMixin
isRecurringEventsRecurringEvents
isSchedulingIssueResolutionSchedulingIssueResolution
isStateState
isTaskNavigationTaskNavigation
isTimelineBaseTimelineBase
isTimelineDateMapperTimelineDateMapper
isTimelineDomEventsTimelineDomEvents
isTimelineEventRenderingTimelineEventRendering
isTimelineScrollTimelineScroll
isTimelineStateTimelineState
isTimelineViewPresetsTimelineViewPresets
isTimelineZoomableTimelineZoomable
isToolableToolable
isTransactionalFeatureMixinTransactionalFeatureMixin
isWidgetWidget

Data

The ProjectModel instance containing the data visualized by the Gantt chart.

assignmentsGanttStores
calendarsGanttStores
dependenciesGanttStores
resourcesGanttStores
tasksGanttStores
taskStoreGanttStores
timeRangesGanttStores

Other

Set to true for sub tasks to inherit their parent´s eventColor

Configure UI transitions for various actions in the grid.

ParameterTypeDescription
insertRecordBoolean

Transition record insertions

removeRecordBoolean

Transition record removals

toggleColumnBoolean

Transition column visibility changes

expandCollapseColumnBoolean

Transition parent/group column expand/collapse

toggleRegionBoolean

Transition region expand/collapse

toggleTreeNodeBoolean

Transition tree node expand/collapse

toggleGroupBoolean

Transition group expand/collapse

filterRemovalBoolean

Transition row removals caused by filtering (under specific conditions)

removeEventBoolean

Transition task removals

changeEventBoolean

Transition task changes

$namestaticWidget
columnWidget
firstItemContainer
hasChangesContainer
isValidContainer
itemsContainer
labelPositionContainer
lastItemContainer
renditionContainer
rtlRTL
spanWidget
stateSettingsGridState
toolsPanel
typestaticWidget
valuesContainer

Scheduled events

Task color used by default. Tasks can specify their own eventColor, which will override this config.

For available standard colors, see EventColor.

barMarginTimelineEventRendering
displayDateFormatTimelineViewPresets
eventColorsstaticTimelineEventRendering
eventStyleTimelineEventRendering
eventStylesstaticTimelineEventRendering
fillTicksTimelineEventRendering
hasVisibleEventsTimelineBase
snapTimelineDateMapper
tickSizeTimelineEventRendering

Accessibility

keyMapKeyMap

Content

bbarPanel
tbarPanel

CSS

clsWidget

Dates

timelineContextTimelineDomEvents
timeResolutionTimelineDateMapper
viewportCenterDateTimelineDateMapper
visibleDateRangeTimelineBase

DOM

appendToWidget
contentWidget
datasetWidget
elementWidget
htmlWidget
idWidget
styleWidget

Float & align

xWidget
yWidget

Infinite scroll

infiniteScrollTimelineScroll

Layout

alignSelfWidget
bodyHeightGridBase
flexWidget
footerHeightGridBase
headerHeightGridBase
heightWidget
layoutContainer
layoutStyleContainer
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
widthWidget

Lifecycle

configBase

Misc

cellEllipsisGridBase
cellInfoWidget
columnLinesGridBase
disabledWidget
enableUndoRedoKeysGridElementEvents
hideFootersGridBase
hideHeadersGridBase
hideRowHoverTimelineBase
hoveredCellGridElementEvents
localeHelperLocalizable
localeManagerLocalizable
longPressTimeGridElementEvents
pluginsPluggable
refWidget
responsiveLevelGridResponsive
rowLinesGridBase
tabWidget
timeZoneTimelineBase
titlePanel
tooltipWidget

Record

recordContainer

Rows

Scrolling

scrollLeftTimelineScroll
scrollTopTimelineScroll
scrollXTimelineScroll
timelineScrollerTimelineScroll

Selection

selectedCellGridSelection
selectedCellsGridSelection
selectedRecordGridSelection
selectedRecordsGridSelection
selectedRowsGridSelection
selectionModeGridSelection

State

stateGridState

Time axis

forceFitTimelineBase
partnersTimelineBase
suppressFitTimelineBase
timeAxisTimelineBase
timeAxisColumnTimelineBase
timeAxisSubGridTimelineBase
timeAxisViewModelTimelineBase
workingTimeTimelineBase

Tree

Visibility

hiddenWidget
isVisibleWidget

Widget hierarchy

ownerWidget
parentWidget
widgetMapContainer

Zoom

maxZoomLevelTimelineZoomable
minZoomLevelTimelineZoomable
zoomLevelTimelineZoomable

Functions

178

Feature shortcuts

Returns the dependency record for a DOM element

NOTE: Only available when the Dependencies feature is enabled.

ParameterTypeDescription
elementHTMLElement

The dependency line element

Returns: DependencyModel -

The dependency record

Misc

Highlights the elements of the passed task records (or ids). If scrollToClosest is set to true (which it is by default), the highlighted task element closest to the viewport center will be scrolled into view.

The highlighting will be done by adding the css class b-highlighted to the highlighted task elements. Also, the css class b-is-highlighting will be added to the TimeAxisSubGrid element.

// Highlight a single task
gantt.highlightTasks({ tasks : 22 });
// Highlight multiple tasks
gantt.highlightTasks({ tasks : [1, 40] });
// Don't scroll to highlighted task and don't un-highlight on click
gantt.highlightTasks({ tasks : 1000, scroll : false, unhighlightOnClick : false });
ParameterTypeDescription
optionsObject

Options config object

options.tasksTaskModel | Number | String | TaskModel[] | Number[] | String[]

The task records or ids to highlight. If an empty array is passed, the b-is-highlighting class will be applied, rendering all event elements in the style of :not(.b-highlighted).

options.scrollBoolean | BryntumScrollOptions

If false, no scrolling will be performed. If a scrollOptions object, this object will be passed to the scroll function providing details on how to scroll.

options.unhighlightOnClickBoolean

If false, a call to unhighlightTasks is needed to remove the highlighting. Otherwise, the highlighting will be removed when the user clicks somewhere in the browser window.

options.unhighlightOthersBoolean

If true this will automatically un-highlight the tasks not present in the tasks property

Removes highlighting from the elements of the passed task records (or ids). If no tasks are passed all highlighted tasks will be un-highlighted.

gantt.unhighlightTasks({ tasks : 22 }); // single task
gantt.unhighlightTasks({ tasks : [1, 40] }); // multiple events
ParameterTypeDescription
optionsObject

Options config object

options.tasksTaskModel | Number | String | TaskModel[] | Number[] | String[]

The task records or ids to un-highlight. Omit this to un-highlight all.

addPluginsPluggable
attachTooltipstaticWidget
fromElementstaticWidget
fromSelectorstaticWidget
getByIdstaticWidget
getPluginPluggable
hasFeatureGridFeatures
hasPluginPluggable
highlightEventsTimelineBase
isOfTypeNamestaticBase
maskBodyGridBase
mixinstaticBase
optionalLstaticLocalizable
unhighlightEventsTimelineBase
unmaskBodyGridBase

Other

Adds a new milestone task below the passed reference task

ParameterTypeDescription
taskRecordTaskModel

The reference task record

optionsObject

Options for creating the new milestone

options.dataTaskModelConfig

Data for the new milestone

Returns: TaskModel -

A promise which yields the added task

Adds a predecessor task to the passed reference task

ParameterTypeDescription
taskRecordTaskModel

The reference task record

optionsObject

Options for creating the new task

options.dataTaskModelConfig

Data for the new task

Returns: TaskModel -

A promise which yields the added task

Adds a new subtask to the passed reference task

ParameterTypeDescription
taskRecordTaskModel

The reference task record

optionsObject

Options for creating the new subtask

options.atstart | end

Where to insert the new subtask in the parent's children.

options.dataTaskModelConfig

Data for the new task

Returns: TaskModel -

A promise which yields the added task

Adds a successor task to the passed reference task

ParameterTypeDescription
taskRecordTaskModel

The reference task record

optionsObject

Options for creating the new task

options.dataTaskModelConfig

Data for the new task

Returns: TaskModel -

A promise which yields the added task

Adds a new task above the passed reference task. If no options are provided, the new task will inherit the data from the reference task

ParameterTypeDescription
taskRecordTaskModel

The reference task record

optionsObject

Options for creating the new task

options.dataTaskModelConfig

Data for the new task

Returns: TaskModel -

A promise which yields the added task

Adds a new task below the passed reference task. If no options are provided, the new task will inherit the data from the reference task

ParameterTypeDescription
taskRecordTaskModel

The reference task record

optionsObject

Options for creating the new task

options.dataTaskModelConfig

Data for the new task

Returns: TaskModel -

A promise which yields the added task

Increase the indentation level of one or more tasks in the tree. Has no effect if TreeGroup has regrouped the tree.

ParameterTypeDescription
tasksTaskModel[] | TaskModel

The task(s) to indent.

Returns: Promise -

A promise which resolves if operation is successful

Decrease the indentation level of one or more tasks in the tree. Has no effect if TreeGroup has regrouped the tree.

ParameterTypeDescription
tasksTaskModel[] | TaskModel

The task(s) to outdent.

Returns: Promise -

A promise which resolves if operation is successful

addContainer
addPartnerTimelineBase
composeWidget
createOnFrameDelayable
disableWidget
enableWidget
focusWidget
formatDurationTimelineBase
getAtContainer
getScheduleRegionGanttRegions
getTaskBoxGanttRegions
getWidgetByIdContainer
insertContainer
isInTimeAxisEventNavigation
isPartneredWithTimelineBase
LstaticLocalizable
maskWidget
onEvents
preserveViewCenterTimelineBase
recomposeWidget
relayAllEvents
removeContainer
removeAllContainer
removePartnerTimelineBase
resetValuesContainer
setEndDateTimelineBase
setStartDateTimelineBase
setTimeSpanTimelineBase
setValuesContainer
shiftTimelineZoomable
shiftNextTimelineZoomable
shiftPreviousTimelineZoomable
triggerEvents
unEvents
unmaskWidget
zoomToFitTimelineZoomable

Configuration

applyDefaultsstaticBase

Data

getOccurrencesForRecurringEvents

Dates

getCoordinateFromDateTimelineDateMapper
getDateFromCoordinateTimelineDateMapper
getDateFromDomEventTimelineDateMapper
getDateFromXYTimelineDateMapper
getTimeSpanDistanceTimelineDateMapper

Events

Float & align

alignToWidget
setXYWidget
showByWidget
toFrontWidget

Getters

getCellGridBase

Lifecycle

createstaticWidget
destroystaticBase
initClassstaticWidget

Rendering

refreshRowGridBase
refreshRowsGridBase
renderRowsGridBase

Rows

getRowForGridBase

Scrolling

scrollHorizontallyToTimelineScroll
scrollToTimelineScroll
scrollToDateTimelineScroll
scrollToNowTimelineScroll
scrollToTopGridBase
scrollVerticallyToTimelineScroll
storeScrollGridBase

Selection

deselectAllGridSelection
deselectCellGridSelection
deselectCellsGridSelection
deselectRowGridSelection
deselectRowsGridSelection
isCellSelectedGridSelection
isSelectableGridSelection
isSelectedGridSelection
selectAllGridSelection
selectCellGridSelection
selectCellRangeGridSelection
selectCellsGridSelection
selectRangeGridSelection
selectRowGridSelection
selectRowsGridSelection

State

SubGrid

getSubGridGridSubGrids

Visibility

hideWidget
showWidget

Widget hierarchy

closestWidget
containsWidget
ownsWidget
queryWidget
queryAllWidget
upWidget

Zoom

zoomInTimelineZoomable
zoomInFullTimelineZoomable
zoomOutTimelineZoomable
zoomOutFullTimelineZoomable
zoomToTimelineZoomable
zoomToLevelTimelineZoomable
zoomToSpanTimelineZoomable

Events

74

Fires when adding a task from the UI to allow data mutation.

// Adding a listener using the "on" method
ganttBase.on('beforeTaskAdd', ({ source, taskRecord }) => {

});
ParameterTypeDescription
sourceGantt

The Gantt instance

taskRecordTaskModel

The task

Task is released, no longer in view/removed. A good spot for cleaning custom things added in a renderTask listener up, if needed.

// Adding a listener using the "on" method
ganttBase.on('releaseTask', ({ source, renderData, taskRecord, element }) => {

});
ParameterTypeDescription
sourceGantt

The Gantt instance

renderDataObject

Task render data

taskRecordTaskModel

Rendered task

elementHTMLElement

Task element

Task is rendered, its element is available in DOM.

// Adding a listener using the "on" method
ganttBase.on('renderTask', ({ source, renderData, taskRecord, element }) => {

});
ParameterTypeDescription
sourceGantt

The Gantt instance

renderDataObject

Task render data

taskRecordTaskModel

Rendered task

elementHTMLElement

Task element

Triggered when clicking a resource avatar or chip in the cells of the ResourceAssignmentColumn.

// Adding a listener using the "on" method
ganttBase.on('resourceAssignmentClick', ({ source, taskRecord, resourceRecord, event }) => {

});
ParameterTypeDescription
sourceGantt

This Gantt

taskRecordTaskModel

Task record

resourceRecordResourceModel

Resource record

eventEvent

Browser event

Triggered after a click on a task bar.

// Adding a listener using the "on" method
ganttBase.on('taskClick', ({ source, taskRecord, event }) => {

});
ParameterTypeDescription
sourceGantt

The Gantt instance

taskRecordTaskModel

The Task record

eventMouseEvent

The native browser event

Triggered after a rightclick (or long press on a touch device) on a task.

// Adding a listener using the "on" method
ganttBase.on('taskContextMenu', ({ source, taskRecord, event }) => {

});
ParameterTypeDescription
sourceGantt

The Gantt instance

taskRecordTaskModel

The Task record

eventMouseEvent

The native browser event

Triggered after a doubleclick on a task.

// Adding a listener using the "on" method
ganttBase.on('taskDblClick', ({ source, taskRecord, event }) => {

});
ParameterTypeDescription
sourceGantt

The Gantt instance

taskRecordTaskModel

The Task record

eventMouseEvent

The native browser event

Triggered when a keydown event is observed if there are selected tasks.

// Adding a listener using the "on" method
ganttBase.on('taskKeyDown', ({ source, taskRecord, event }) => {

});
ParameterTypeDescription
sourceGantt

This Gantt

taskRecordTaskModel

Task record

eventKeyboardEvent

Browser event

Triggered when a keyup event is observed if there are selected tasks.

// Adding a listener using the "on" method
ganttBase.on('taskKeyUp', ({ source, taskRecord, event }) => {

});
ParameterTypeDescription
sourceGantt

This Gantt

taskRecordTaskModel

Task record

eventKeyboardEvent

Browser event

Triggered after a mousedown on a task bar.

// Adding a listener using the "on" method
ganttBase.on('taskMouseDown', ({ source, taskRecord, event }) => {

});
ParameterTypeDescription
sourceGantt

The Gantt instance

taskRecordTaskModel

The Task record

eventMouseEvent

The native browser event

Triggered for mouseout from a task.

// Adding a listener using the "on" method
ganttBase.on('taskMouseOut', ({ source, taskRecord, event }) => {

});
ParameterTypeDescription
sourceGantt

The Gantt instance

taskRecordTaskModel

The Task record

eventMouseEvent

The native browser event

Triggered after a mouseover on a task.

// Adding a listener using the "on" method
ganttBase.on('taskMouseOver', ({ source, taskRecord, event }) => {

});
ParameterTypeDescription
sourceGantt

The Gantt instance

taskRecordTaskModel

The Task record

eventMouseEvent

The native browser event

Triggered after a mouseup on a task bar.

// Adding a listener using the "on" method
ganttBase.on('taskMouseUp', ({ source, taskRecord, event }) => {

});
ParameterTypeDescription
sourceGantt

The Gantt instance

taskRecordTaskModel

The Task record

eventMouseEvent

The native browser event

beforeAssignmentDeleteRecurringEvents
beforeEventDeleteRecurringEvents
beforePresetChangeTimelineViewPresets
catchAllEvents
cellClickGridElementEvents
cellContextMenuGridElementEvents
cellDblClickGridElementEvents
cellMouseEnterGridElementEvents
cellMouseLeaveGridElementEvents
cellMouseOutGridElementEvents
cellMouseOverGridElementEvents
dataChangeGridBase
dateRangeChangeTimelineBase
destroyEvents
dragSelectingGridSelection
expandPanel
focusInWidget
focusOutWidget
headerClickGridElementEvents
hideWidget
mouseOutGridElementEvents
mouseOverGridElementEvents
navigateEventNavigation
noZoomChangeTimelineZoomable
paintWidget
presetChangeTimelineViewPresets
readOnlyWidget
recomposeWidget
renderRowGridBase
renderRowsGridBase
resizeWidget
responsiveGridResponsive
rowMouseEnterGridElementEvents
rowMouseLeaveGridElementEvents
scrollGridBase
selectionChangeGridSelection
selectionModeChangeGridSelection
showWidget
tickSizeChangeTimelineEventRendering
timeAxisChangeTimelineBase
timeAxisHeaderClickTimelineDomEvents
timeAxisHeaderContextMenuTimelineDomEvents
timeAxisHeaderDblClickTimelineDomEvents
timelineContextChangeTimelineDomEvents

Event handlers

74

Called when adding a task from the UI to allow data mutation.

new GanttBase({
    onBeforeTaskAdd({ source, taskRecord }) {

    }
});
ParameterTypeDescription
sourceGantt

The Gantt instance

taskRecordTaskModel

The task

Task is released, no longer in view/removed. A good spot for cleaning custom things added in a renderTask listener up, if needed.

new GanttBase({
    onReleaseTask({ source, renderData, taskRecord, element }) {

    }
});
ParameterTypeDescription
sourceGantt

The Gantt instance

renderDataObject

Task render data

taskRecordTaskModel

Rendered task

elementHTMLElement

Task element

Task is rendered, its element is available in DOM.

new GanttBase({
    onRenderTask({ source, renderData, taskRecord, element }) {

    }
});
ParameterTypeDescription
sourceGantt

The Gantt instance

renderDataObject

Task render data

taskRecordTaskModel

Rendered task

elementHTMLElement

Task element

Called when clicking a resource avatar or chip in the cells of the ResourceAssignmentColumn.

new GanttBase({
    onResourceAssignmentClick({ source, taskRecord, resourceRecord, event }) {

    }
});
ParameterTypeDescription
sourceGantt

This Gantt

taskRecordTaskModel

Task record

resourceRecordResourceModel

Resource record

eventEvent

Browser event

Called after a click on a task bar.

new GanttBase({
    onTaskClick({ source, taskRecord, event }) {

    }
});
ParameterTypeDescription
sourceGantt

The Gantt instance

taskRecordTaskModel

The Task record

eventMouseEvent

The native browser event

Called after a rightclick (or long press on a touch device) on a task.

new GanttBase({
    onTaskContextMenu({ source, taskRecord, event }) {

    }
});
ParameterTypeDescription
sourceGantt

The Gantt instance

taskRecordTaskModel

The Task record

eventMouseEvent

The native browser event

Called after a doubleclick on a task.

new GanttBase({
    onTaskDblClick({ source, taskRecord, event }) {

    }
});
ParameterTypeDescription
sourceGantt

The Gantt instance

taskRecordTaskModel

The Task record

eventMouseEvent

The native browser event

Called when a keydown event is observed if there are selected tasks.

new GanttBase({
    onTaskKeyDown({ source, taskRecord, event }) {

    }
});
ParameterTypeDescription
sourceGantt

This Gantt

taskRecordTaskModel

Task record

eventKeyboardEvent

Browser event

Called when a keyup event is observed if there are selected tasks.

new GanttBase({
    onTaskKeyUp({ source, taskRecord, event }) {

    }
});
ParameterTypeDescription
sourceGantt

This Gantt

taskRecordTaskModel

Task record

eventKeyboardEvent

Browser event

Called after a mousedown on a task bar.

new GanttBase({
    onTaskMouseDown({ source, taskRecord, event }) {

    }
});
ParameterTypeDescription
sourceGantt

The Gantt instance

taskRecordTaskModel

The Task record

eventMouseEvent

The native browser event

Called for mouseout from a task.

new GanttBase({
    onTaskMouseOut({ source, taskRecord, event }) {

    }
});
ParameterTypeDescription
sourceGantt

The Gantt instance

taskRecordTaskModel

The Task record

eventMouseEvent

The native browser event

Called after a mouseover on a task.

new GanttBase({
    onTaskMouseOver({ source, taskRecord, event }) {

    }
});
ParameterTypeDescription
sourceGantt

The Gantt instance

taskRecordTaskModel

The Task record

eventMouseEvent

The native browser event

Called after a mouseup on a task bar.

new GanttBase({
    onTaskMouseUp({ source, taskRecord, event }) {

    }
});
ParameterTypeDescription
sourceGantt

The Gantt instance

taskRecordTaskModel

The Task record

eventMouseEvent

The native browser event

onBeforeEventDeleteRecurringEvents
onBeforePresetChangeTimelineViewPresets
onCellClickGridElementEvents
onCellContextMenuGridElementEvents
onCellDblClickGridElementEvents
onCellMouseEnterGridElementEvents
onCellMouseLeaveGridElementEvents
onCellMouseOutGridElementEvents
onCellMouseOverGridElementEvents
onDataChangeGridBase
onDateRangeChangeTimelineBase
onDestroyEvents
onDragSelectingGridSelection
onFocusInWidget
onHeaderClickGridElementEvents
onHideWidget
onMouseOutGridElementEvents
onMouseOverGridElementEvents
onNavigateEventNavigation
onNoZoomChangeTimelineZoomable
onPaintWidget
onPresetChangeTimelineViewPresets
onRenderRowGridBase
onRenderRowsGridBase
onResizeWidget
onResponsiveGridResponsive
onRowMouseEnterGridElementEvents
onRowMouseLeaveGridElementEvents
onScrollGridBase
onSelectionChangeGridSelection
onShowWidget
onTickSizeChangeTimelineEventRendering
onTimeAxisChangeTimelineBase
onTimeAxisHeaderClickTimelineDomEvents
onTimeAxisHeaderDblClickTimelineDomEvents
onTimelineContextChangeTimelineDomEvents

Typedefs

18

CSS variables

106
NameDescription
--b-gantt-task-padding-inlineTask inline padding (for content in the task bar)
--b-gantt-task-border-radiusTask border radius
--b-gantt-parent-task-max-heightMax height for parent tasks. Set to `null` to let them always grow with the height of the row
--b-gantt-task-font-weightTask font weight (for content in the task bar)
--b-gantt-task-font-sizeTask font size (for content in the task bar)
--b-gantt-task-border-widthTask border width. Should always include a unit (e.g. `0px`, not `0`)
--b-gantt-task-border-styleTask border style
--b-gantt-task-z-indexTask z-index
--b-gantt-task-transitionTask transitions that are always applied
--b-gantt-task-animating-transitionTask transitions that are applied when animating changes
--b-gantt-task-box-shadowTask box shadow
--b-gantt-task-min-widthTask min width
--b-gantt-task-primaryTask primary color, applied to normal task bars (not milestones or parents). A shade of it is then used for the bar, determined by the current theme & task style
--b-gantt-parent-task-primaryParent task primary color
--b-gantt-milestone-primaryMilestone primary color
--b-gantt-unscheduled-task-colorColor for the icon used to illustrate unscheduled tasks
--b-gantt-inactive-cell-colorCell color for inactive tasks
--b-gantt-inactive-task-colorTask primary color for inactive tasks
--b-sch-event-backgroundTask background color (overridden by event styles). Styling is shared with Scheduler, hence the name
--b-sch-event-colorTask border color (overridden by event styles). Styling is shared with Scheduler, hence the name / * --b-sch-event-border-color : null */ ** Task text color (overridden by event styles). Styling is shared with Scheduler, hence the name
Hovered
--b-sch-event-hover-backgroundHovered task's background color (overridden by event styles). Styling is shared with Scheduler, hence the name
Selected
--b-sch-event-selected-backgroundSelected task's background color (overridden by event styles). Styling is shared with Scheduler, hence the name