TimelineBase

Abstract base class used by timeline based components such as Scheduler and Gantt. Based on Grid, supplies a "locked" region for columns and a "normal" for rendering of events etc.

Configs

198

Common

durationDisplayPrecision: Number | Boolean= 1

Decimal precision used when displaying durations, used by tooltips and DurationColumn. Specify false to use raw value

endDate: Date | StringAlso a property

The end date of the timeline (if not configure with infiniteScroll).

If omitted, it will be calculated based on the startDate setting and the 'defaultSpan' property of the current viewPreset.

If a string is supplied, it will be parsed using DateHelper.defaultFormat.

Note: If you need to set start and end date at the same time, use the setTimeSpan method.

maxDate: Date | StringAlso a property

Get/set end date limit of the timeline. Actions such as timeline scrolling, all types of timeline zooms and shifts will respect this limit.

minDate: Date | StringAlso a property

Get/set start date limit of the timeline. Actions such as timeline scrolling, all types of timeline zooms and shifts will respect this limit.

The start date of the timeline (if not configure with infiniteScroll).

If omitted, and a TimeAxis has been set, the start date of the provided TimeAxis will be used. If no TimeAxis has been configured, it'll use the start/end dates of the loaded event dataset. If no date information exists in the event data set, it defaults to the current date and time.

If a string is supplied, it will be parsed using DateHelper.defaultFormat.

When using infiniteScroll, use visibleDate to control initially visible date instead.

Note: If you need to set start and end date at the same time, use the setTimeSpan method.

A date to bring into view initially on the scrollable timeline.

This may be configured as either a Date or a scrolling options object describing the scroll action, including a date option which references a Date.

See scrollToDate for details about scrolling options.

Note that if a naked Date is passed, it will be stored internally as a scrolling options object using the following defaults:

{
    date  : <The Date object>,
    block : 'nearest'
}

This moves the date into view by the shortest scroll, so that it just appears at an edge.

To bring your date of interest to the center of the viewport, configure your Scheduler thus:

    visibleDate : {
        date  : new Date(2023, 5, 17, 12),
        block : 'center'
    }
columnsGridBase
dataGridBase
emptyTextGridBase
featuresGridBase
keyMapGridBase
listenersEvents
presetsTimelineViewPresets
rowHeightGridBase
storeGridBase
viewPresetTimelineViewPresets

Misc

defaultRegion: String= locked

Region to which columns are added when they have none specified

By default the row hover effect is not visible in the Scheduler part of the grid.

Set this to false to show the hover effect in Scheduler rows.

timeZone: String | NumberAlso a property

Set to a time zone or a UTC offset. This will set the projects timeZone config accordingly. As this config is only a referer, please see project's config documentation for more information.

new Calendar(){
  timeZone : 'America/Chicago'
}
cellEllipsisGridBase
columnLinesGridBase
dataFieldWidget
destroyStoreGridBase
disabledWidget
enableStickyGridBase
enableUndoRedoKeysGridElementEvents
hideFootersGridBase
hideHeadersGridBase
hoverClsGridElementEvents
iconPanel
localeClassLocalizable
localizableLocalizable
longPressTimeGridElementEvents
maskDefaultsGridBase
maskedWidget
ownerWidget
pluginsPluggable
readOnlyGridBase
refWidget
responsiveLevelsGridResponsive
rippleWidget
rowLinesGridBase
showDirtyGridBase
tabWidget
titlePanel
tooltipWidget

Scheduled events

enableEventAnimations: Boolean= truedeprecatedAlso a property

Set to false if you don't want event bar DOM updates to animate.

Affects drag drop and resizing of events when snap is enabled.

If set to true, dates will be snapped relative to event start. e.g. for a zoom level with timeResolution = { unit: "s", increment: "20" }, an event that starts at 10:00:03 and is dragged would snap its start date to 10:00:23, 10:00:43 etc.

When set to false, dates will be snapped relative to the timeAxis startDate (tick start)

  • 10:00:03 -> 10:00:20, 10:00:40 etc.
barMarginTimelineEventRendering
displayDateFormatTimelineViewPresets
enableRecurringEventsRecurringEvents
eventColorTimelineEventRendering
eventStyleTimelineEventRendering
fillTicksTimelineEventRendering
managedEventSizingTimelineEventRendering
snapTimelineDateMapper
tickSizeTimelineEventRendering

Time axis

autoAdjustTimeAxis: Boolean= true

You can set this option to false to make the timeline panel start and end on the exact provided startDate/endDate w/o adjusting them.

forceFit: Boolean= falseAlso a property

Set to true to force the time columns to fit to the available space (horizontal or vertical depends on mode). Note that setting suppressFit to true, will disable forceFit functionality. Zooming cannot be used when forceFit is set.

Partners this Timeline panel with another Timeline in order to sync their region sizes (sub-grids like locked, normal will get the same width), start and end dates, view preset, zoom level and scrolling position. All these values will be synced with the timeline defined as the partner.

Can be specified as:

  • A Timeline instance reference

  • A string selector: widget type (e.g. 'gantt'), id selector (e.g. '#myGantt'), or attribute selector (e.g. '[ref=myGantt]')

  • To add a new partner dynamically see addPartner method.

  • To remove existing partner see removePartner method.

  • To check if timelines are partners see isPartneredWith method.

Column widths and hide/show state are synced between partnered schedulers when the column set is identical.

stickyHeaders: Boolean= true

When set, the text in the major time axis header sticks in the scrolling viewport as long as possible.

Set to true to prevent auto calculating of a minimal tickSize to always fit the content to the screen size. Setting this property on true will disable forceFit behaviour.

A TimeAxis config object or instance, used to create a backing data store of 'ticks' providing the input date data for the time axis of timeline panel. Created automatically if none supplied.

weekStartDay: Number

A valid JS day index between 0-6 (0: Sunday, 1: Monday etc.) to be considered the start day of the week. When omitted, the week start day is retrieved from the active locale class.

An object with format { fromDay, toDay, fromHour, toHour } that describes the working days and hours. This object will be used to populate TimeAxis include property.

Using it results in a non-continuous time axis. Any ticks not covered by the working days and hours will be excluded. Events within larger ticks (for example if using week as the unit for ticks) will be stretched to fill the gap otherwise left by the non-working hours.

As with end dates, toDay and toHour are exclusive. Thus toDay : 6 means that day 6 (saturday) will not be included.

NOTE: When this feature is enabled Zooming feature is not supported. It's recommended to disable zooming controls:

new Scheduler({
    zoomOnMouseWheel          : false,
    zoomOnTimeAxisDoubleClick : false,
    ...
});
ParameterTypeDescription
workingTime.fromDayNumber

Day index 0-6 (0 is Sunday)

workingTime.toDayNumber

Day index 0-6 (0 is Sunday)

workingTime.fromHourNumber

0-23

workingTime.toHourNumber

0-23

Accessibility

ariaLabelWidget

Content

bbarPanel
defaultsContainer
footerPanel
headerPanel
itemsContainer
lazyItemsContainer
namedItemsContainer
stripsPanel
tbarPanel
textContentContainer
toolsPanel

CSS

bodyClsPanel
borderContainer
clsWidget
colorWidget
htmlClsWidget
itemClsContainer
styleWidget
uiPanel

Dates

timeResolutionTimelineDateMapper

DOM

adoptWidget
appendToWidget
contentWidget
datasetWidget
htmlWidget
idWidget
tagWidget

Float & align

alignWidget
anchorWidget
centeredWidget
draggableWidget
floatingWidget
xWidget
yWidget

Infinite scroll

bufferCoefTimelineScroll
bufferThresholdTimelineScroll
infiniteScrollTimelineScroll

Layout

alignSelfWidget
autoHeightGridBase
dockWidget
flexWidget
getRowHeightGridBase
heightWidget
hiddenWidget
hideWhenEmptyContainer
layoutContainer
layoutStyleContainer
marginWidget
maxHeightWidget
maxWidthWidget
minHeightGridBase
minWidthWidget
textAlignWidget
weightWidget
widthWidget

Masking

loadMaskLoadMaskable
loadMaskDefaultsLoadMaskable
loadMaskErrorLoadMaskable
syncMaskLoadMaskable

misc

tabBarItemsContainer

Other

columnWidget
defaultFocusContainer
drawerPanel
labelPositionContainer
renditionContainer
rtlRTL
spanWidget
stateSettingsGridState
transitionGridBase

Record

recordContainer

Scrolling

scrollableGridBase

Selection

selectionModeGridSelection

State

stateIdState

Tree

Zoom

maxZoomLevelTimelineZoomable
minZoomLevelTimelineZoomable
visibleZoomFactorTimelineZoomable
zoomOnMouseWheelTimelineZoomable

Properties

189

Common

Get/set endDate. Defaults to startDate + default span of the used ViewPreset.

Note: If you need to set start and end date at the same time, use setTimeSpan method.

maxDate: Date | StringAlso a config

Get/set end date limit of the timeline. Actions such as timeline scrolling, all types of timeline zooms and shifts will respect this limit.

minDate: Date | StringAlso a config

Get/set start date limit of the timeline. Actions such as timeline scrolling, all types of timeline zooms and shifts will respect this limit.

Get/set startDate. Defaults to current date if none specified.

When using infiniteScroll, use visibleDate to control initially visible date instead.

Note: If you need to set start and end date at the same time, use setTimeSpan method.

A scrolling options object describing the scroll action, including a date option which references a Date. See scrollToDate for details about scrolling options.

    // The date we want in the center of the Scheduler viewport
    myScheduler.visibleDate = {
        date    : new Date(2023, 5, 17, 12),
        block   : 'center',
        animate : true
    };
columnsGridBase
dataGridBase
emptyTextGridBase
featuresGridFeatures
presetsTimelineViewPresets
rowHeightGridBase
storeGridBase
subGridsGridSubGrids
viewPresetTimelineViewPresets

Class hierarchy

isTimelineBase: Boolean= truereadonly
Identifies an object as an instance of TimelineBase class, or subclass thereof.
isTimelineBase: Boolean= truereadonlystatic
Identifies an object as an instance of TimelineBase class, or subclass thereof.
isContainerContainer
isDelayableDelayable
isEventsEvents
isGridGrid
isGridBaseGridBase
isGridElementEventsGridElementEvents
isGridFeaturesGridFeatures
isGridResponsiveGridResponsive
isGridSelectionGridSelection
isGridStateGridState
isGridSubGridsGridSubGrids
isKeyMapKeyMap
isLoadMaskableLoadMaskable
isLocalizableLocalizable
isPanelPanel
isPluggablePluggable
isRecurringEventsRecurringEvents
isStateState
isTimelineDateMapperTimelineDateMapper
isTimelineDomEventsTimelineDomEvents
isTimelineEventRenderingTimelineEventRendering
isTimelineScrollTimelineScroll
isTimelineStateTimelineState
isTimelineViewPresetsTimelineViewPresets
isTimelineZoomableTimelineZoomable
isToolableToolable
isWidgetWidget

Dates

visibleDateRange: Objectreadonly

Returns an object representing the visible date range

ParameterTypeDescription
visibleDateRange.startDateDate
visibleDateRange.endDateDate
timelineContextTimelineDomEvents
timeResolutionTimelineDateMapper
viewportCenterDateTimelineDateMapper

Misc

By default the row hover effect is not visible in the Scheduler part of the grid.

Set this to false to show the hover effect in Scheduler rows.

timeZone: String | NumberAlso a config

Set to a time zone or a UTC offset. This will set the projects timeZone config accordingly. As this config is only a referer, please see project's config documentation for more information.

new Calendar(){
  timeZone : 'America/Chicago'
}
cellEllipsisGridBase
cellInfoWidget
columnLinesGridBase
disabledWidget
enableUndoRedoKeysGridElementEvents
hideFootersGridBase
hideHeadersGridBase
hoveredCellGridElementEvents
localeHelperLocalizable
localeManagerLocalizable
longPressTimeGridElementEvents
pluginsPluggable
readOnlyGridBase
refWidget
responsiveLevelGridResponsive
rowLinesGridBase
tabWidget
titlePanel
tooltipWidget

Scheduled events

enableEventAnimations: Boolean= truedeprecatedAlso a config

Set to false if you don't want event bar DOM updates to animate.

hasVisibleEvents: Booleanreadonly

Returns true if any of the events/tasks or feature injected elements (such as ResourceTimeRanges) are within the timeAxis

barMarginTimelineEventRendering
displayDateFormatTimelineViewPresets
eventColorTimelineEventRendering
eventColorsstaticTimelineEventRendering
eventStyleTimelineEventRendering
eventStylesstaticTimelineEventRendering
fillTicksTimelineEventRendering
snapTimelineDateMapper
tickSizeTimelineEventRendering

Time axis

forceFit: Boolean= falseAlso a config

Set to true to force the time columns to fit to the available space (horizontal or vertical depends on mode). Note that setting suppressFit to true, will disable forceFit functionality. Zooming cannot be used when forceFit is set.

Returns the partnered timelines.

suppressFit: Boolean= falseAlso a config

Set to true to prevent auto calculating of a minimal tickSize to always fit the content to the screen size. Setting this property on true will disable forceFit behaviour.

A backing data store of 'ticks' providing the input date data for the time axis of timeline panel.

Returns the TimeAxisColumn instance

Returns the subGrid containing the time axis

timeAxisSubGridElement: HTMLElementreadonly

Returns the html element for the subGrid containing the time axis

The internal view model, describing the visual representation of the time axis.

An object with format { fromDay, toDay, fromHour, toHour } that describes the working days and hours. This object will be used to populate TimeAxis include property.

Using it results in a non-continuous time axis. Any ticks not covered by the working days and hours will be excluded. Events within larger ticks (for example if using week as the unit for ticks) will be stretched to fill the gap otherwise left by the non-working hours.

As with end dates, toDay and toHour are exclusive. Thus toDay : 6 means that day 6 (saturday) will not be included.

NOTE: When this feature is enabled Zooming feature is not supported. It's recommended to disable zooming controls:

new Scheduler({
    zoomOnMouseWheel          : false,
    zoomOnTimeAxisDoubleClick : false,
    ...
});
ParameterTypeDescription
workingTime.fromDayNumber

Day index 0-6 (0 is Sunday)

workingTime.toDayNumber

Day index 0-6 (0 is Sunday)

workingTime.fromHourNumber

0-23

workingTime.toHourNumber

0-23

Accessibility

keyMapKeyMap

Content

bbarPanel
tbarPanel

CSS

clsWidget

DOM

appendToWidget
contentWidget
datasetWidget
elementWidget
htmlWidget
idWidget
styleWidget

Float & align

xWidget
yWidget

Infinite scroll

infiniteScrollTimelineScroll

Layout

alignSelfWidget
bodyHeightGridBase
flexWidget
footerHeightGridBase
headerHeightGridBase
heightWidget
layoutContainer
layoutStyleContainer
marginWidget
maxHeightWidget
maxWidthWidget
minHeightWidget
minWidthWidget
widthWidget

Lifecycle

configBase

Other

$namestaticWidget
columnWidget
firstItemContainer
hasChangesContainer
isValidContainer
itemsContainer
labelPositionContainer
lastItemContainer
renditionContainer
rtlRTL
spanWidget
stateSettingsGridState
toolsPanel
transitionGridBase
typestaticWidget
valuesContainer

Record

recordContainer

Rows

Scrolling

scrollLeftTimelineScroll
scrollTopTimelineScroll
scrollXTimelineScroll
timelineScrollerTimelineScroll

Selection

selectedCellGridSelection
selectedCellsGridSelection
selectedRecordGridSelection
selectedRecordsGridSelection
selectedRowsGridSelection
selectionModeGridSelection

State

stateGridState

Tree

Visibility

hiddenWidget
isVisibleWidget

Widget hierarchy

ownerWidget
parentWidget
widgetMapContainer

Zoom

maxZoomLevelTimelineZoomable
minZoomLevelTimelineZoomable
zoomLevelTimelineZoomable

Functions

160

Misc

Highlights the elements of the passed event or assignment records (or record ids). If scrollToClosest is set to true (which it is by default), the highlighted event element closest to the viewport center will be scrolled into view.

The highlighting will be done by adding the css class b-highlighted to the highlighted event elements. Also, the css class b-is-highlighting will be added to the TimeAxisSubGrid element.

// Highlight single event
scheduler.highlightEvents({ events : 22 });
// Highlight multiple events
scheduler.highlightEvents({ events : [1, 40] });
// Don't scroll to highlighted event, and don't un-highlight on click
scheduler.highlightEvents({ events : 1000, scroll : false, unhighlightOnClick : false });
ParameterTypeDescription
optionsObject

Options config object

options.eventsEventModel | AssignmentModel | Number | String | EventModel[] | AssignmentModel[] | Number[] | String[]

The event records, assignment records or record ids to highlight. If providing ids, they will be interpreted as event ids only if singleAssignment is true, otherwise they will be interpreted as assignment ids. If an empty array is passed, the b-is-highlighting class will be applied, rendering all event elements in the style of :not(.b-highlighted).

options.scrollBoolean | BryntumScrollOptions

If false, no scrolling will be performed. If a scrollOptions object, this object will be passed to the scroll function providing details on how to scroll.

options.unhighlightOnClickBoolean

If false, a call to unhighlightEvents is needed to remove the highlighting. Otherwise, the highlighting will be removed when the user clicks somewhere in the browser window.

options.unhighlightOthersBoolean

If true this will automatically un-highlight the events not present in the events property

Removes highlighting from the elements of the passed event or assignment records (or record ids). If no events are passed all highlighted events will be un-highlighted.

scheduler.unhighlightEvents({ events : 22 }); // single event
scheduler.unhighlightEvents({ events : [1, 40] }); // multiple events
ParameterTypeDescription
optionsObject

Options config object

options.eventsEventModel | AssignmentModel | Number | String | EventModel[] | AssignmentModel[] | Number[] | String[]

The event or assignment records or record ids to un-highlight. Omit this to un-highlight all.

addPluginsPluggable
attachTooltipstaticWidget
fromElementstaticWidget
fromSelectorstaticWidget
getByIdstaticWidget
getPluginPluggable
hasFeatureGridFeatures
hasPluginPluggable
isOfTypeNamestaticBase
maskBodyGridBase
mixinstaticBase
optionalLstaticLocalizable
unmaskBodyGridBase

Other

Partners this Timeline with the passed Timeline in order to sync the horizontal scrolling position and zoom level.

The following properties are imported into this component from the added partner and shared:

In a set of partnered Timelines, there will only be a single instance of the above properties. The time range and scroll position in that time range are always the same among all partnered timelines.

ParameterTypeDescription
otherTimelineTimelineBase

The timeline to partner with

Returns a rounded duration value to be displayed in UI (tooltips, labels etc)

ParameterTypeDescription
durationNumber

The raw duration value

nbrDecimalsNumber

The number of decimals, defaults to durationDisplayPrecision

Returns: Number -

The rounded duration

A chainable function which Features may hook to add their own content to the foreground canvas

ParameterTypeDescription
configsArray

An array of domConfigs, append to it to have the config applied to the foreground canvas

A chainable function which Features may hook to add their own content to the timeaxis header.

ParameterTypeDescription
configsArray

An array of domConfigs, append to it to have the config applied to the header

Checks whether the passed timeline is partnered with the current timeline.

ParameterTypeDescription
partnerTimelineBase

The timeline to check the partnering with

Returns: Boolean -

Returns true if the timelines are partnered

Calls the specified function (returning its return value) and preserves the timeline center point. This is a useful way of retaining the user's visual context while making updates and changes to the view which require major changes or a full refresh.

ParameterTypeDescription
fnfunction

The function to call.

thisObjObject

The this context for the function.

args*

Parameters to the function.

Refreshes the grid with transitions enabled.

Breaks the link between current Timeline and the passed Timeline

  • To add a new partner see addPartner method.
  • To get the list of partners see partners getter.
ParameterTypeDescription
otherTimelineTimelineBase

The timeline to unlink from

Sets the timeline end date

Note:

  • If you need to set start and end date at the same time, use the setTimeSpan method.
  • If keepDuration is false and new end date is less than start date, it will throw an exception.
ParameterTypeDescription
dateDate

The new end date

keepDurationBoolean

Pass true to keep the duration of the timeline ("move" the timeline), false to change the duration ("resize" the timeline). Defaults to false.

Sets the timeline start date.

Note:

  • If you need to set start and end date at the same time, use the setTimeSpan method.
  • If keepDuration is false and new start date is greater than end date, it will throw an exception.
ParameterTypeDescription
dateDate

The new start date

keepDurationBoolean

Pass true to keep the duration of the timeline ("move" the timeline), false to change the duration ("resize" the timeline). Defaults to true.

Changes the Scheduler's time axis timespan to the supplied start and end dates.

ParameterTypeDescription
newStartDateDate

The new start date

newEndDateDate

The new end date. If omitted or equal to startDate, the defaultSpan property of the current view preset will be used to calculate the new end date.

optionsObject

An object containing modifiers for the time span change operation.

options.maintainVisibleStartBoolean

Specify as true to keep the visible start date stable.

options.visibleDateDate

The date inside the range to scroll into view

addContainer
composeWidget
createOnFrameDelayable
disableWidget
enableWidget
focusWidget
getAtContainer
getWidgetByIdContainer
insertContainer
LstaticLocalizable
maskWidget
onEvents
recomposeWidget
relayAllEvents
removeContainer
removeAllContainer
resetValuesContainer
setValuesContainer
shiftTimelineZoomable
shiftNextTimelineZoomable
shiftPreviousTimelineZoomable
triggerEvents
unEvents
unmaskWidget
zoomToFitTimelineZoomable

Configuration

applyDefaultsstaticBase

Data

getOccurrencesForRecurringEvents

Dates

getCoordinateFromDateTimelineDateMapper
getDateFromCoordinateTimelineDateMapper
getDateFromDomEventTimelineDateMapper
getDateFromXYTimelineDateMapper
getTimeSpanDistanceTimelineDateMapper

Events

Float & align

alignToWidget
setXYWidget
showByWidget
toFrontWidget

Getters

getCellGridBase

Lifecycle

createstaticWidget
destroystaticBase
initClassstaticWidget

Rendering

refreshRowGridBase
refreshRowsGridBase
renderRowsGridBase

Rows

getRowForGridBase

Scrolling

scrollHorizontallyToTimelineScroll
scrollToTimelineScroll
scrollToDateTimelineScroll
scrollToNowTimelineScroll
scrollToTopGridBase
scrollVerticallyToTimelineScroll
storeScrollGridBase

Selection

deselectAllGridSelection
deselectCellGridSelection
deselectCellsGridSelection
deselectRowGridSelection
deselectRowsGridSelection
isCellSelectedGridSelection
isSelectableGridSelection
isSelectedGridSelection
selectAllGridSelection
selectCellGridSelection
selectCellRangeGridSelection
selectCellsGridSelection
selectRangeGridSelection
selectRowGridSelection
selectRowsGridSelection

State

SubGrid

getSubGridGridSubGrids

Visibility

hideWidget
showWidget

Widget hierarchy

closestWidget
containsWidget
ownsWidget
queryWidget
queryAllWidget
upWidget

Zoom

zoomInTimelineZoomable
zoomInFullTimelineZoomable
zoomOutTimelineZoomable
zoomOutFullTimelineZoomable
zoomToTimelineZoomable
zoomToLevelTimelineZoomable
zoomToSpanTimelineZoomable

Events

60

Fired when the range of dates encapsulated by the UI changes. This will be when moving a view in time by reconfiguring its timeAxis. This will happen when zooming, or changing viewPreset.

Contrast this with the visibleDateRangeChange event which fires much more frequently, during scrolling along the time axis and changing the visible date range.

// Adding a listener using the "on" method
timelineBase.on('dateRangeChange', ({ source, old, old.startDate, old.endDate, new, new.startDate, new.endDate }) => {

});
ParameterTypeDescription
sourceTimelineBase

This Scheduler/Gantt instance.

oldObject

The old date range

old.startDateDate

the old start date.

old.endDateDate

the old end date.

newObject

The new date range

new.startDateDate

the new start date.

new.endDateDate

the new end date.

Fired when the timeaxis has changed, for example by zooming or configuring a new time span.

// Adding a listener using the "on" method
timelineBase.on('timeAxisChange', ({ source, config, config.startDate, config.endDate }) => {

});
ParameterTypeDescription
sourceScheduler

This Scheduler

configObject

Config object used to reconfigure the time axis.

config.startDateDate

New start date (if supplied)

config.endDateDate

New end date (if supplied)

Fired when the scheduler viewport (not the overall Scheduler element) changes size. This happens when the grid changes height, or when the subgrid which encapsulates the scheduler column changes width.

// Adding a listener using the "on" method
timelineBase.on('timelineViewportResize', ({ source, width, height, oldWidth, oldHeight }) => {

});
ParameterTypeDescription
sourceWidget

This Scheduler

widthNumber

The new width

heightNumber

The new height

oldWidthNumber

The old width

oldHeightNumber

The old height

Fired when the range of dates visible within the viewport changes. This will be when scrolling along a time axis.

Note that this event will fire frequently during scrolling, so any listener should probably be added with the buffer option to slow down the calls to your handler function :

listeners : {
    visibleDateRangeChange({ old, new }) {
        this.updateRangeRequired(old, new);
    },
    // Only call once. 300 ms after the last event was detected
    buffer : 300
}
// Adding a listener using the "on" method
timelineBase.on('visibleDateRangeChange', ({ source, old, old.startDate, old.endDate, new, new.startDate, new.endDate }) => {

});
ParameterTypeDescription
sourceScheduler

This Scheduler instance.

oldObject

The old date range

old.startDateDate

the old start date.

old.endDateDate

the old end date.

newObject

The new date range

new.startDateDate

the new start date.

new.endDateDate

the new end date.

beforeAssignmentDeleteRecurringEvents
beforeEventDeleteRecurringEvents
beforePresetChangeTimelineViewPresets
catchAllEvents
cellClickGridElementEvents
cellContextMenuGridElementEvents
cellDblClickGridElementEvents
cellMouseEnterGridElementEvents
cellMouseLeaveGridElementEvents
cellMouseOutGridElementEvents
cellMouseOverGridElementEvents
dataChangeGridBase
destroyEvents
dragSelectingGridSelection
expandPanel
focusInWidget
focusOutWidget
headerClickGridElementEvents
hideWidget
mouseOutGridElementEvents
mouseOverGridElementEvents
noZoomChangeTimelineZoomable
paintWidget
presetChangeTimelineViewPresets
readOnlyWidget
recomposeWidget
renderRowGridBase
renderRowsGridBase
resizeWidget
responsiveGridResponsive
rowMouseEnterGridElementEvents
rowMouseLeaveGridElementEvents
scrollGridBase
selectionChangeGridSelection
selectionModeChangeGridSelection
showWidget
tickSizeChangeTimelineEventRendering
timeAxisHeaderClickTimelineDomEvents
timeAxisHeaderContextMenuTimelineDomEvents
timeAxisHeaderDblClickTimelineDomEvents
timelineContextChangeTimelineDomEvents

Event handlers

60

Called when the range of dates encapsulated by the UI changes. This will be when moving a view in time by reconfiguring its timeAxis. This will happen when zooming, or changing viewPreset.

Contrast this with the visibleDateRangeChange event which called much more frequently, during scrolling along the time axis and changing the visible date range.

new TimelineBase({
    onDateRangeChange({ source, old, new }) {

    }
});
ParameterTypeDescription
sourceTimelineBase

This Scheduler/Gantt instance.

oldObject

The old date range

old.startDateDate

the old start date.

old.endDateDate

the old end date.

newObject

The new date range

new.startDateDate

the new start date.

new.endDateDate

the new end date.

Called when the timeaxis has changed, for example by zooming or configuring a new time span.

new TimelineBase({
    onTimeAxisChange({ source, config }) {

    }
});
ParameterTypeDescription
sourceScheduler

This Scheduler

configObject

Config object used to reconfigure the time axis.

config.startDateDate

New start date (if supplied)

config.endDateDate

New end date (if supplied)

Called when the scheduler viewport (not the overall Scheduler element) changes size. This happens when the grid changes height, or when the subgrid which encapsulates the scheduler column changes width.

new TimelineBase({
    onTimelineViewportResize({ source, width, height, oldWidth, oldHeight }) {

    }
});
ParameterTypeDescription
sourceWidget

This Scheduler

widthNumber

The new width

heightNumber

The new height

oldWidthNumber

The old width

oldHeightNumber

The old height

Called when the range of dates visible within the viewport changes. This will be when scrolling along a time axis.

Note that this event will fire frequently during scrolling, so any listener should probably be added with the buffer option to slow down the calls to your handler function :

listeners : {
    visibleDateRangeChange({ old, new }) {
        this.updateRangeRequired(old, new);
    },
    // Only call once. 300 ms after the last event was detected
    buffer : 300
}
new TimelineBase({
    onVisibleDateRangeChange({ source, old, new }) {

    }
});
ParameterTypeDescription
sourceScheduler

This Scheduler instance.

oldObject

The old date range

old.startDateDate

the old start date.

old.endDateDate

the old end date.

newObject

The new date range

new.startDateDate

the new start date.

new.endDateDate

the new end date.

onBeforeEventDeleteRecurringEvents
onBeforePresetChangeTimelineViewPresets
onCellClickGridElementEvents
onCellContextMenuGridElementEvents
onCellDblClickGridElementEvents
onCellMouseEnterGridElementEvents
onCellMouseLeaveGridElementEvents
onCellMouseOutGridElementEvents
onCellMouseOverGridElementEvents
onDataChangeGridBase
onDestroyEvents
onDragSelectingGridSelection
onFocusInWidget
onHeaderClickGridElementEvents
onHideWidget
onMouseOutGridElementEvents
onMouseOverGridElementEvents
onNoZoomChangeTimelineZoomable
onPaintWidget
onPresetChangeTimelineViewPresets
onRenderRowGridBase
onRenderRowsGridBase
onResizeWidget
onResponsiveGridResponsive
onRowMouseEnterGridElementEvents
onRowMouseLeaveGridElementEvents
onScrollGridBase
onSelectionChangeGridSelection
onShowWidget
onTickSizeChangeTimelineEventRendering
onTimeAxisHeaderClickTimelineDomEvents
onTimeAxisHeaderDblClickTimelineDomEvents
onTimelineContextChangeTimelineDomEvents

Typedefs

18

Options accepted by the Scheduler's visibleDate property.

ParameterTypeDescription
dateDate

The date to bring into view.

blockstart | end | center | nearest

How far to scroll the date.

edgeOffsetNumber

edgeOffset A margin around the date to bring into view.

animateAnimateScrollOptions | Boolean | Number

Set to true to animate the scroll by 300ms, or the number of milliseconds to animate over, or an animation config object.

AlignSpecWidget
ChangePresetOptionsTimelineZoomable
ColorWidget
ColumnStateGridState
GridSelectionModeGridSelection
GridStateInfoGridState
ResponsiveLevelConfigGridResponsive
SubGridStateGridState
TimelineStateInfoTimelineState

CSS variables

84