onBeforeSectionRender

fires before a single Timeline section was configured, but not rendered yet (the Timeline view only)

boolean onBeforeSectionRender(string mode,object section,object timeline){ ... };

Parameters

modestringthe timeline mode: 'cell', 'bar' or 'tree'
sectionobjectthe section object with the 'key' and 'label' properties specified in the 'y_unit' array
of the Timeline configuration object (e.g. {key:1, label:"James Smith"})
timelineobjectthe Timeline configuration object

Returns

booleandefines whether the default action of the event will be triggered (true) or canceled (false)

Available only in PRO Edition

Example

scheduler.attachEvent("onBeforeSectionRender", function (mode, section, timeline){
    //any custom logic here
    return true;
});

Details

The event can be used to customize the timeline sections.

Back to top