Options described here are the options for the controller constructor. Everything you need to customize your timeline happens here.
Name
Description
Type
Default
start
The date from which the timeline will start. If undefined it will take the minimum date from the input nodes/edges
number | Date
undefined
end
The date from which the timeline will end. If undefined it will take the maximum date from the input nodes/edges
number | Date
undefined
showBarchart
Whether to show the barchart by default. Has no effect if switchOnZoom is true, as it will pick the most appropriate view depending on the number of elements.
boolean
false
switchOnZoom
Whether the timeline should automatically switch between barchart and timeline mode during zoom in/out.
boolean
true
nodeStartPath
The path to retrieve start dates from nodes data. Use dotted notation if it is nested.
string
start
nodeEndPath
The path to retrieve end dates from nodes data.
string
end
edgeStartPath
The path to retrieve start dates from edges data.
string
start
edgeEndPath
The path to retrieve end dates from edges data.
string
end
timebars
The "blue bars", shown on the timeline. They are used for filtering. See Timebar.
Similar to Ogma groupsopen in new window, pass a function that takes a node as an argument and returns a string representing in which group the node belongs.
(node: Node) => string
node => nodes
nodeGroupContent
A function that takes the groupId returned by groupIdFunction, the nodes in the group and returns the title to display for this group in the timeline.
Similar to Ogma groupsopen in new window , pass a function that takes an edge as an argument and returns a string representing in which group the edge belongs.
(edge: Edge) => string
edge => edges
edgeGroupContent
A function that takes the groupId returned by groupIdFunction, the nodes in the group and returns the title to display for this group in the timeline.
The timeline plugin is an event emmitter, to hook to the events it fires, just type plugin.on(myevent, () => }{})
Name
Description
Type
timechange
Event triggered when a timebar has changed position. When user drags a timebar for instance.
void
select
Event triggered when selection in the barchart/timeline changes. This event contains the nodes/edges that are related to the selection in the timeline.