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.

Rollups
//<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

Common

disabledInstancePlugin
listenersEvents

Other

Set to true to roll up tasks to all parents and grandparents.

template: function

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

ParameterTypeDescription
dataObject

A data block containing the information needed to create tooltip content.

data.taskTaskModel

The summary task to rollup to.

data.childrenTaskModel[]

The array of rollup tasks.

Returns: String -

String representing the HTML markup

hideDelayTooltipBase
hoverDelayTooltipBase

Misc

autoUpdateTooltipBase
clientInstancePlugin
localeClassLocalizable
localizableLocalizable

Properties

17

Common

disabledInstancePlugin

Class hierarchy

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

Lifecycle

configBase

Misc

clientInstancePlugin
localeHelperLocalizable
localeManagerLocalizable
tooltipTooltipBase

Other

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

4
NameDescription
--b-rollup-milestone-sizeSize of rolled up milestones
--b-rollup-primaryRollup primary color
--b-rollup-backgroundRollup background. By default a shade of its primary color
--b-rollup-milestone-primaryRollup milestone primary color