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
Configs
14Other
Precision of displayed duration, defaults to use durationDisplayPrecision.
Specify an integer value to override that setting, or false to use raw value
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
| Parameter | Type | Description |
|---|---|---|
data | Object | Tooltip data |
data.taskRecord | TaskModel | Task record |
data.startClockHtml | String | Predefined HTML to show the start time |
data.endClockHtml | String | Predefined HTML to show the end time |
String representing the HTML markup
Misc
Properties
18
Properties
18Common
Class hierarchy
Other
Precision of displayed duration, defaults to use durationDisplayPrecision.
Specify an integer value to override that setting, or false to use raw value
Misc
Functions
28
Functions
28Configuration
Events
Misc
Other
Events
7
Events
7Event handlers
7
Event handlers
7Typedefs
1
Typedefs
1CSS variables
1
CSS variables
1| Name | Description |
|---|---|
--b-task-tooltip-title-font-weight | Task tooltip title font weight |