For Dashboard Designers Reference TimelineView
Thursday, August 21, 2025 8:02 AMTimelineView
Label: :IA_Function
Property: type: TimelineView
Inherits from: Function and View
The TimelineView Function renders a Timeline with events. It is based on vis-timeline.
Function parameters
Key | Description | Default value | Possible values | |
---|---|---|---|---|
events.id |
IDs of all events | Array of strings/numbers | ||
events.type |
Types of all events. See "Visuals" section for examples. | Array of strings: box (default) /point /range /background |
||
events.title |
Titles of all events | Array of strings | ||
events.content |
Contents of all events | Array of strings | ||
events.start |
[Required] Start date/times of all events | Array of strings | ||
events.end |
[Required for type range /background ] End date/times of all events |
Array of strings | ||
events.group |
ID of the group this event belongs to | undefined | string | |
events.{...} |
Other (optional) event properties | Event properties as documented here | ||
groups.{group_id}.content |
Group label | String | ||
groups.{group_id}.{...} |
Other (optional) group properties | Group properties as documented here | ||
timeMarkers |
Collection of time markers shown on the timeline | Collection (object) of time markers | ||
timeMarkers.{marker_id}.datetime |
Position of time marker as date/time string | string |
||
timeMarkers.{marker_id}.title |
Label that appear on the top-right of the marker | string |
||
timeMarkers.{marker_id}.editable |
Allow the user to edit the title of the marker | false |
true / false |
|
options |
Settings for the timeline. See "Important Options" below. | |||
state.selected.events |
An array of event IDs to pre-select when the view is loaded. | [] | Array of events | |
visibleRange |
The initial time interval to display on the screen. | Object | ||
visibleRange.start |
Timestamp (Date instance) of the left-most (currently) visible point in the view | Date instance / Epoch time as Number / date as String |
||
visibleRange.end |
Timestamp (Date instance) of the right-most (currently) visible point in the view | Date instance / Epoch time as Number / date as String |
Note: Both events
and groups
can be passed either as:
An array of property objects, e.g.:
events: [
{id:'event1', title:'My Event'},
{id:'event2', title: 'Other Event'}
]
An object of id-object pairs, e.g.:
events: {
event1: {title: 'My Event'},
event2: {title: 'Other Event'}
}
A transposed object of property arrays, e.g.:
events: {
id: ['event1','event2'],
title: ['My Event', 'Other Event']
}
Visuals
The TimelineView
can display events in several ways, depending on the type
property of the event.
- box: A box with content. (Default) (Image placeholder: A screenshot of a box event)
- point: A point on the timeline. (Image placeholder: A screenshot of a point event)
- range: A colored range on the timeline. (Image placeholder: A screenshot of a range event)
- background: A colored background area. (Image placeholder: A screenshot of a background event)
Important Options
The options
parameter allows you to customize the behavior of the timeline. While all options from the official documentation are supported, here are a few of the most common ones:
Key | Description | Default value |
---|---|---|
multiselect |
If true , the user can select multiple events. |
false |
zoomable |
If true , the user can zoom in and out of the timeline. |
true |
editable.updateTime |
If true , the user can drag events to change their time. |
false |
editable.add |
If true , the user can add new events by double-clicking. |
false |
editable.remove |
If true , the user can delete events. |
false |
Security
The xss
option for sanitizing HTML content is a global setting on the vis-timeline
library. If multiple TimelineView instances are running at the same time and at least one has options.xss.disabled
NOT true
all running timelines will have it enabled (regardless of the state of options.xss.disabled
property of each instance).
Outgoing triggers
Type: context
The following context menus are available from the TimelineView:
Menu | Occurs when | Target value |
---|---|---|
event |
User right-clicks an event | Right-clicked event data. |
group |
User right-clicks a group | Right-clicked group data. |
timeline |
User right-clicks the timeline | Right-clicked moment as object with date , time , and dateTime properties. |
More info on context menus.
Type: eventClick
Occurrence: When the user clicks an event.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
data |
The clicked event | Any |
Type: eventDoubleClick
Occurrence: When the user double-clicks an event.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
data |
The double-clicked event | Any |
Type: eventMoved
Occurrence: When the user drags and drops an event to a new time.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
data |
The moved event with its new time | Any |
Type: groupClick
Occurrence: When the user clicks a group label.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
group |
The ID of the clicked group | Any |
Type: selectionChanged
Occurrence: When the user selects/unselects one (or multiple) events.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
events |
Array with selected events | Array of events |
Note: by default vis-timeline allows only one selected event at a time. To allow multiple events to be selected set $options.multiselect
to true
Type: timelineClick
Occurrence: When the user clicks anywhere on the timeline.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
time |
The clicked time | Time string |
date |
The clicked date | Date string |
dateTime |
The clicked date and time | Date and time string |
group |
The group that was clicked (if any) | string |
Type: timelineDoubleClick
Occurrence: When the user double-clicks anywhere on the timeline.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
time |
The double-clicked | Time string |
date |
The double-clicked date | Date string |
dateTime |
The double-clicked date and time | Date and time string |
group |
The group that was double-clicked (if any) | string |
Type: timeMarkerChange
Occurrence: When the user drags a time marker to a new date/time.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
data |
New state of the time marker | timeMarker object |
key |
key of the dragged time marker | string |
old |
Initial (old) state of the changed time marker | timeMarker object |
Type: timeMarkerTitleChange
Occurrence: When the user edits a time marker's title
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
data |
New state of the edited time marker | timeMarker object |
key |
key of the edited time marker | string |
old |
Initial (old) state of the edited time marker | timeMarker object |
Type: visibleRangeChange
Occurrence: When the user drags the timeline horizontally. This trigger is only fired when the range is changed by the user.
Additional event properties (besides the inherited properties):
Key | Description | Possible values |
---|---|---|
start |
The start date/time of the visible interval | Date instance |
end |
The end date/time of the visible interval | Date instance |
Complete Example
This example demonstrates how to use the TimelineView
in combination with an HtmlView
to display details of a selected event.
1. The TimelineView
First, create a TimelineView
Function node with some sample events. This timeline will have the multiselect
option enabled.
2. The HtmlView
Next, create an HtmlView
Function node. This view will display the details of the selected event(s). The template
property will be used to format the output.
3. The Trigger
Finally, create a Trigger
that connects the TimelineView
to the HtmlView
. This trigger will fire on the selectionChanged
event and update the jsonString
property of the HtmlView
with the selected event data.
{
"date": "2025-08-18T14:03:51.825Z",
"nodes": [
{
"id": 209,
"labels": [
"IA_Function"
],
"properties": {
"#events": "evaluate([{
\"content\": \"Event 1\",
\"id\": \"event1\",
\"start\": \"2025-08-01\",
\"end\": \"2025-08-02\"
}, {
\"content\": \"Event 2\",
\"id\": \"event2\",
\"start\": \"2025-08-10\"
}, {
\"content\": \"Event 3\",
\"id\": \"event3\",
\"start\": \"2025-08-21\",
\"end\": \"2025-08-21\"
}])",
"name": "My Timeline",
"options.multiselect": true,
"type": "TimelineView",
"uuid": "84b60d57-1d88-4b6e-9ad7-0cc3a7ca8a7a"
}
},
{
"id": 210,
"labels": [
"IA_Function"
],
"properties": {
"$jsonString": "",
"template": "<pre>{{{ jsonString }}}</pre>",
"type": "HtmlView",
"uuid": "249c793e-52d1-4f88-a149-98b5d6c1cd60"
}
}
],
"relations": [
{
"id": 383,
"source": 209,
"target": 210,
"from": "84b60d57-1d88-4b6e-9ad7-0cc3a7ca8a7a",
"to": "249c793e-52d1-4f88-a149-98b5d6c1cd60",
"type": "TRIGGER",
"properties": {
"$jsonString": "evaluate(toJSON((%).events, null, 2))",
"type": "selectionChanged"
}
}
]
}