Search

Timeline Instance Methods

Timeline instance methods are used to update the view.

Use ref to call methods on an instance of a timeline.

Expands entities by adding sub-rows to space out events vertically, see Expanded Rows.

Returns ExpandedRows

An object containing the ids of the entities to be expanded and the mode used to determine them.

Exports a static image of the timeline. The exported image is encoded in a blob URL.

Parameters

options
required
ExportOptions

Options related to producing an export of the current view.

boolean default: true

Whether to include annotations in the output.

type

required
'png'

The file type of the output.

Returns Promise

A promise that will resolve with an object containing the blob URL of the exported image or reject with an error.

Fits all the events and time series chart data points in the active range into the viewport. If Scale Wrapping is used, fits the wrapped time range into the viewport.

Returns void

Gets an object describing the position of an annotation's body.

Parameters

string

The id of the annotation.

Returns AnnotationBodyPosition | null

An AnnotationBodyPosition object, or null if the annotation is not shown in the timeline.

Gets an object describing the position of an entity.

Parameters

entityId
required
string

The id of the entity.

Returns EntityPosition | null

An EntityPosition object, or null if the entity is not shown in the timeline.

Gets an object describing the position of an event.

Parameters

eventId
required
string

The id of the event.

Returns EventPosition | null

An EventPosition object, or null if the event is not in the current timeline range.

Returns an object detailing the ids of events and entities that are in the current range.

Parameters

object

Specifies which items are included.

boolean default: true

If there is an entity that is focused, then this option defines whether to include just the focused entity and its neighbors. Otherwise all events and entities in the current range are included.

Returns { entities: Object, events: Object }

Objects whose keys are the ids of entities and events in the current range.

Determines whether the heatmap is currently shown.

Returns boolean

True if the heatmap is currently shown, otherwise false.

Returns an object detailing the mode of calculation for the width of the label area and the width.

Returns LabelAreaWidth

An object containing the mode of calculation for the width of the label area and the width.

Pans the timeline in the specified direction. The panning range is limited and depends on the timeline data.

Parameters

direction
required
'left' | 'right'
number
default: 0.3

How far to pan the timeline. The distance is measured as a proportion of space across the visible timeline range.

Returns void

Adds an animated effect to a specified event, and then removes it again.

Parameters

id
required
string | string[]

The id or ids of the events to ping.

object

Options to control the animation.

string default: '#909090'

The color to use for the animated effect.

'individual' | 'grouped' default: 'individual'

Whether the specified events should each have their own ping animation, or all events have a single outer ping animation.

number default: 1

The number of times the animation should be repeated.

number default: 42

The distance between the start and the end of the ping stroke, in pixels.

number default: 12

The width of the ping stroke at the end of the animation, in pixels.

number default: 800

The time the animation should take, in milliseconds.

Returns void

Returns a snapshot of the current timeline component. You can use this to restore the timeline to this state using the spread operator. See also Using Snapshots.

Zoom the timeline in the manner specified. The zooming range is limited and depends on the timeline data.

Parameters

direction
required
'in' | 'out'

Returns void

Terms of use

These terms do not alter or supersede any existing agreements between you (or your employer) and us.

By accessing or using any Content you agree to be bound by these Terms of Use. Please review these terms carefully before using the website.

The contents of this website, including but not limited to any text, code samples, API references, schemas, interactive tools, and other materials (collectively, the 'Content'), are made available for informational and internal evaluation purposes only. All intellectual property rights in the Content are reserved. No licence is granted to use the Content for any commercial purpose, or to copy, distribute, modify, reverse-engineer, or incorporate any part of the Content into any product or service, without our prior written consent.

This Content is provided “as is” and “as available,” without any representations, warranties, or guarantees of any kind, whether express or implied, including but not limited to implied warranties of merchantability, fitness for a particular purpose, non-infringement, or accuracy. To the fullest extent permitted by applicable law, we expressly exclude and disclaim all implied warranties, conditions, and other terms that might otherwise be implied.

We disclaim all liability for any loss or damage, whether direct, indirect, incidental, consequential, or otherwise, arising from any reliance placed on the Content or from your use of it, to the fullest extent permitted by applicable law. By continuing to access or use the Content, you acknowledge and agree to these terms.