TaskTooltip

This feature displays a task tooltip on mouse hover. The template of the tooltip is customizable with the template function.

Showing custom HTML in the tooltip

new Gantt({
    features : {
        taskTooltip : {
            template : ({ taskRecord }) => `Tooltip for ${taskRecord.name}`,
            // Tooltip configs can be used here
            align    : 'l-r' // Align left to right
        }
    }
});

Showing remotely loaded data

Loading remote data into the task tooltip is easy. Simply use the template and return a Promise which yields the content to show.

new Gantt({
    features : {
        taskTooltip : {
            template : ({ taskRecord }) => AjaxHelper.get(`./fakeServer?name=${taskRecord.name}`).then(response => response.text())
        }
    }
});

This feature is enabled by default.

Configs

14

Common

disabledInstancePlugin
listenersEvents

Other

Precision of displayed duration, defaults to use durationDisplayPrecision. Specify an integer value to override that setting, or false to use raw value

template: function

Template (a function accepting task data and returning a string) used to display info in the tooltip. The template will be called with an object as with fields as detailed below

ParameterTypeDescription
dataObject

Tooltip data

data.taskRecordTaskModel

Task record

data.startClockHtmlString

Predefined HTML to show the start time

data.endClockHtmlString

Predefined HTML to show the end time

Returns: String -

String representing the HTML markup

hideDelayTooltipBase
hoverDelayTooltipBase

Misc

autoUpdateTooltipBase
clientInstancePlugin
localeClassLocalizable
localizableLocalizable

Properties

18

Common

disabledInstancePlugin

Class hierarchy

isTaskTooltip: Boolean= truereadonly
Identifies an object as an instance of TaskTooltip class, or subclass thereof.
isTaskTooltip: Boolean= truereadonlystatic
Identifies an object as an instance of TaskTooltip class, or subclass thereof.
isEventsEvents
isInstancePluginInstancePlugin
isLocalizableLocalizable
isTooltipBaseTooltipBase

Other

Precision of displayed duration, defaults to use durationDisplayPrecision. Specify an integer value to override that setting, or false to use raw value

Lifecycle

configBase

Misc

clientInstancePlugin
localeHelperLocalizable
localeManagerLocalizable
tooltipTooltipBase

Functions

28

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

doDisableInstancePlugin
initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Other

LstaticLocalizable
onEvents
relayAllEvents
triggerEvents
unEvents

Events

7
beforeShowTooltipBase
catchAllEvents
destroyEvents
disableInstancePlugin
enableInstancePlugin
showTooltipBase

Event handlers

7
onBeforeShowTooltipBase
onDestroyEvents
onDisableInstancePlugin
onEnableInstancePlugin
onShowTooltipBase

Typedefs

1

CSS variables

1
NameDescription
--b-task-tooltip-title-font-weightTask tooltip title font weight