Rollups
If the task's rollup data field is set to true, it displays a small bar or diamond below its summary task in the timeline.
Each of the rollup elements show a tooltip when hovering it with details of the task.
The tooltip content is customizable, see template config for details.
To edit the rollup data field, use RollupColumn or a checkbox on Advanced tab of TaskEditor.
This feature is disabled by default. For info on enabling it, see GridFeatures.
//<code-header>
fiddle.title = 'Rollups';
//</code-header>
targetElement.innerHTML = '<p>This demo shows the rollups feature, hover the rollup to see task information:</p>';
const gantt = new Gantt({
appendTo : targetElement,
height : 350,
startDate : '2019-07-07',
endDate : '2019-07-29',
features : {
rollups : true
},
rowHeight : 60,
project : new ProjectModel({
startDate : '2019-07-07',
duration : 30,
events : [
{
id : 1,
name : 'Project A',
duration : 30,
expanded : true,
children : [
{
id : 11,
name : 'Child 1',
duration : 1,
leaf : true,
rollup : true,
cls : 'child1'
},
{
id : 12,
name : 'Child 2',
duration : 3,
leaf : true,
rollup : true,
cls : 'child1'
},
{
id : 13,
name : 'Child 3',
duration : 0,
rollup : true,
leaf : true,
cls : 'child1'
}
]
}
],
dependencies : [{
id : 1,
lag : 1,
fromEvent : 11,
toEvent : 12
},
{
id : 2,
lag : 1,
fromEvent : 12,
toEvent : 13
}]
})
});Configs
14
Configs
14Other
Set to true to roll up tasks to all parents and grandparents.
Template (a function accepting event 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 | A data block containing the information needed to create tooltip content. |
data.task | TaskModel | The summary task to rollup to. |
data.children | TaskModel[] | The array of rollup tasks. |
String representing the HTML markup
Misc
Properties
17
Properties
17Common
Class hierarchy
Misc
Other
Functions
28
Functions
28Configuration
Events
Misc
Other
Events
7
Events
7Event handlers
7
Event handlers
7Typedefs
1
Typedefs
1CSS variables
4
CSS variables
4| Name | Description |
|---|---|
--b-rollup-milestone-size | Size of rolled up milestones |
--b-rollup-primary | Rollup primary color |
--b-rollup-background | Rollup background. By default a shade of its primary color |
--b-rollup-milestone-primary | Rollup milestone primary color |