- API
- KronoGraph
- Timeline Instance Methods
React
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
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
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
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
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
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: How far to pan the timeline. The distance is measured as a proportion of space across the visible timeline range.
0.3
Returns
void
Adds an animated effect to a specified event, and then removes it again.
Parameters
-
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.
Returns
TimelineSnapshot
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