GroupSummary

A special version of the Grid GroupSummary feature that enables summaries within scheduler. To use a single summary it is easiest to configure renderer, for multiple summaries see summaries.

This feature is disabled by default. It is not supported in vertical mode.

Group summary
//<code-header>
fiddle.title = 'Group summary';
//</code-header>
const scheduler = new Scheduler({
    appendTo : targetElement,

    // makes scheduler as high as it needs to be to fit rows
    autoHeight : true,

    features : {
        group        : 'company',
        groupSummary : {
            renderer : ({ events }) => events.length
        }
    },

    startDate : new Date(2018, 4, 6),
    endDate   : new Date(2018, 4, 13),

    columns : [
        { field : 'name', text : 'Name', width : 150 }
    ],

    resources : [
        { id : 1, name : 'Bernard', company : 'Company A' },
        { id : 2, name : 'Bianca', company : 'Company A' },
        { id : 3, name : 'Belinda', company : 'Company B' }
    ],

    events : [
        { id : 1, resourceId : 1, name : 'First', startDate : '2018-05-07', endDate : '2018-05-10' },
        { id : 2, resourceId : 2, name : 'Second', startDate : '2018-05-08', endDate : '2018-05-12' },
        { id : 3, resourceId : 2, name : 'Third', startDate : '2018-05-09', endDate : '2018-05-10' },
        { id : 4, resourceId : 3, name : 'Fourth', startDate : '2018-05-09', endDate : '2018-05-10' }
    ]
});

Configs

15

Common

disabledInstancePlugin
listenersEvents

Other

renderer: function

Renderer function for a single time axis tick in a group summary row. Should calculate a sum and return HTML as a result.

You should never modify any records inside this method.
new Scheduler({
    features : {
        groupSummary : {
            renderer : ({ startDate, endDate, eventStore, resourceStore, events, resources, groupRecord, groupField, groupValue }) => {
                // return display value
                returns '<div>Renderer output</div>';
            }
        }
    }
});
ParameterTypeDescription
contextObject

Rendering context object

context.startDateDate

Tick start date

context.endDateDate

Tick end date

context.eventsEventModel[]

Events which belong to the group

context.resourcesResourceModel[]

Resources which belong to the group

context.eventStoreEventStore

Event store

context.resourceStoreResourceStore

Resource store

context.groupRecordModel

Current groups header row record

context.groupFieldString

Current groups field name

context.groupValueString

Current groups value

Returns: String -

Html content

showTooltip: Boolean= true

Show tooltip containing summary values and labels

Array of summary configs which consists of a label and a renderer function

 summaries : [
     {
        label : 'Label',
        renderer : ({ startDate, endDate, eventStore, resourceStore, events, resources, groupRecord, groupField, groupValue }) => {
            // return display value
            returns '<div>Renderer output</div>';
        }
     }
 ]
tooltipTemplate: function

Renderer function for the grouping summary tooltip.

new Scheduler({
    features : {
        groupSummary : {
            tooltipTemplate : ({ groupSummaryValues, startDate, endDate, eventStore, resourceStore, events, resources, groupRecord, groupField, groupValue }) => {
                return '<div>My custom tooltip html</div>';
            }
        }
    }
});
ParameterTypeDescription
groupSummaryValuesGroupSummaryValue[]

An array of object with label and value for each summary under the tooltip

startDateDate

Tick start date

endDateDate

Tick end date

eventsEventModel[]

Events which belong to the group

resourcesResourceModel[]

Resources which belong to the group

eventStoreEventStore

Event store

resourceStoreResourceStore

Resource store

groupRecordModel

Current group's header row record

groupFieldString

Current group's field name

groupValueString

Current group's value

Returns: String -

Html content

collapseToHeaderGroupSummary
targetGroupSummary

Misc

clientInstancePlugin
localeClassLocalizable
localizableLocalizable

Properties

18

Common

disabledInstancePlugin

Class hierarchy

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

Other

Array of summary configs which consists of a label and a renderer function

 summaries : [
     {
        label : 'Label',
        renderer : ({ startDate, endDate, eventStore, resourceStore, events, resources, groupRecord, groupField, groupValue }) => {
            // return display value
            returns '<div>Renderer output</div>';
        }
     }
 ]
collapseToHeaderGroupSummary
targetGroupSummary

Lifecycle

configBase

Misc

clientInstancePlugin
localeHelperLocalizable
localeManagerLocalizable

Functions

29

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

doDisableInstancePlugin
initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Other

LstaticLocalizable
onEvents
refreshGroupSummary
relayAllEvents
triggerEvents
unEvents

Events

5
catchAllEvents
destroyEvents
disableInstancePlugin
enableInstancePlugin

Event handlers

5
onDestroyEvents
onDisableInstancePlugin
onEnableInstancePlugin

Typedefs

2

Represents a group summary value and label

ParameterTypeDescription
labelString

The label config from a summary cell

value*

The value returned from the summary cell renderer.

CSS variables

1

Inherited