Element: <oj-timeline>

Oracle® JavaScript Extension Toolkit (JET)
7.1.0

F18183-01

Signature:

class ojTimeline<K, D extends ojTimeline.DataItem|any>

QuickNav

Attributes


Context Objects

JET Custom Elements

JET components are implemented as custom HTML elements. In addition to the component attributes documented in this page, JET components also support standard HTML global attributes like id and aria-label.

The JET data binding syntax can be used to define both component and global attributes through the use of dynamically evaluated expressions. All attributes (component and global) support attribute-level binding by prefixing the attribute name with ":" (e.g. :id="[...]"). When using attribute-level binding, all expression values are treated as strings. Additionally, component attributes support property-level binding by using the attribute name directly with no ":" prefix. When using property-level binding, the expressions should evaluate to the types documented by the corresponding attributes. Property-level binding is strongly recommended over attribute-level binding for component attributes.

A detailed description of working with custom HTML elements can be found in: JET Custom Element Usage.



PREVIEW: This is a preview API. Preview APIs are production quality, but can be changed on a major version without a deprecation path.

Version:
  • 7.1.0
Since:
  • 1.1.0
Module:
  • ojtimeline

Module usage

See JET Module Loading for an overview of module usage within JET.

Typescript Import Format
//To typecheck the element APIs, import as below.
import {ojTimeline} from "ojs/ojtimeline";

//For the transpiled javascript to load the element's module, import as below
import "ojs/ojtimeline";

JET In Typescript

A detailed description of working with JET elements and classes in your typescript project can be found at: JET Typescript Usage.


JET Timeline

Description:

A JET Timeline is a themable, WAI-ARIA compliant element that displays a set of events in chronological order.

The SVG DOM that this component generates should be treated as a black box, as it is subject to change.


<oj-timeline
  start='{{oj.IntlConverterUtils.dateToLocalIso(new Date("Jan 1, 2016"))}}'
  end='{{oj.IntlConverterUtils.dateToLocalIso(new Date("Dec 31, 2016"))}}'
  major-axis='{"scale": "months"}'
  minor-axis='{"scale": "weeks"}'
  series='{{seriesData}}'>
</oj-timeline>

Accessibility

The application is responsible for populating the shortDesc value in the component options object with meaningful descriptors when the component does not provide a default descriptor. Since component terminology for keyboard and touch shortcuts can conflict with those of the application, it is the application's responsibility to provide these shortcuts, possibly via a help popup.

Date and Time Formats

The date/time data in the Timeline plays a key role, not only in the representation of events in the order in which they occurred, but also in many other places, such as the time axis, event durations, time markers, size and position calculations for the overview locator window, etc.

The Timeline supports a simplified version of the ISO 8601 extended date/time format. The format is as follows: YYYY-MM-DDTHH:mm:ss.sssZ

Symbol Description Values Examples
-, :, .,TCharacters actually in the string. T specifies the start of a time.
YYYYYear2013-03-22
2014-02
MMMonth01 to 12
DDDay of the month01 to 31
HHHours00 to 242013-02-04T15:20Z
2013-02-10T15:20:45.300Z
mmMinutes00 to 59
ssSeconds. The seconds and milliseconds are optional if a time is specified.00 to 59
sssMilliseconds00 to 999
ZThe value in this position can be one of the following. If the value is omitted, character 'Z' should be used to specify UTC time.
  • Z indicates UTC time.
  • +hh:mm indicates that the input time is the specified offset after UTC time.
  • -hh:mm indicates that the input time is the absolute value of the specified offset before UTC time.
2013-02-04T15:20:00-07:00
2013-02-04T15:20:00+05:00
2013-02-04T15:20:00Z

The ISO format support short notations where the string must only include the date and not time, as in the following formats: YYYY, YYYY-MM, YYYY-MM-DD.

The ISO format does not support time zone names. You can use the Z position to specify an offset from UTC time. If you do not include a value in the Z position, UTC time is used. The correct format for UTC should always include character 'Z' if the offset time value is omitted. The date-parsing algorithms are browser-implementation-dependent and, for example, the date string '2013-02-27T17:00:00' will be parsed differently in Chrome vs Firefox vs IE.

You can specify midnight by using 00:00, or by using 24:00 on the previous day. The following two strings specify the same time: 2010-05-25T00:00Z and 2010-05-24T24:00Z.

Touch End User Information

Target Gesture Action
Timeline Item Tap Select when selectionMode is enabled.
Press & Hold Display tooltip.
Display context menu on release.
Timeline Panel Drag Paning: navigate forward and backward in time in horizontal/vertical orientation.
Pinch-Close/Spread-Open Zoom In/Out.
Zoom Control Tap on "+" element Zoom In.
Tap on "-" element Zoom Out.
Overview Press on right/left side of window & Hold & Drag in right of left direction Zoom In/Out (resize overview window).
Press & Hold on the body of window & Drag in right of left direction Pan (move overview window).

Keyboard End User Information

Key Action
Tab Move focus to next element.
Shift + Tab Move focus to previous element.
UpArrow Moves focus between series in a Dual Timeline and does nothing in a Single Timeline.
DownArrow
LeftArrow Move focus and selection to previous data item (on left).
RightArrow Move focus and selection to next data item (on right).
Shift + UpArrow Move focus and multi-select previous data item.
Shift + DownArrow Move focus and multi-select next data item.
Shift + LeftArrow Move focus and multi-select previous data item (on left).
Shift + RightArrow Move focus and multi-select next data item (on right).
Ctrl + UpArrow Move focus to previous data item, without changing the current selection.
Ctrl + DownArrow Move focus to next data item, without changing the current selection.
Ctrl + LeftArrow Move focus to previous data item (on left), without changing the current selection.
Ctrl + RightArrow Move focus to next data item (on right), without changing the current selection.
Ctrl + Spacebar Multi-select data item with focus.
= or + Zoom in one level if zooming is enabled.
- or _ Zoom out one level if zooming is enabled.
PageUp Pan up if scrolling is enabled.
PageDown Pan down if scrolling is enabled.
Shift + PageUp Pan left in left-to-right locales. Pan right in right-to-left locales.
Shift + PageDown Pan right in left-to-right locales. Pan left in right-to-left locales.

Performance

Animation

Animation should only be enabled for visualizations of small to medium data sets.

Data Set Size

As a rule of thumb, it's recommended that applications only set usable data densities on the timeline. For example, applications should limit the number of overlapping items rendered beyond the height of the timeline. This can be achieved by increasing the size of the timeline, decreasing the axis scale, or providing external filters to reduce the amount of data rendered at any given time. While there are several optimizations within the timeline to deal with large data sets, it's always more efficient to reduce the data set size as early as possible. Future optimizations will focus on improving end user experience as well as developer productivity for common use cases.

Timeline Span

It's recommended that applications limit the number of time intervals that are rendered by the timeline. For example, a timeline spanning one year with a scale of hours will display (365 * 24) 8,760 intervals. Rendering this many intervals can cause severe performance degradation when interacting with the timeline (scrolling and zooming) regardless of the number of items present.

Reading direction

As with any JET component, in the unusual case that the directionality (LTR or RTL) changes post-init, the component must be refresh()ed.

Note: Application logic should not interact with the component's properties or invoke its methods until the BusyContext indicates that the component is ready for interaction.

Slots

JET components that allow child content support slots. Please see the slots section of the JET component overview doc for more information on allowed slot content and slot types.

contextMenu

The contextMenu slot is set on the oj-menu within this element. This is used to designate the JET Menu that this component should launch as a context menu on right-click, Shift-F10, Press & Hold, or component-specific gesture. If specified, the browser's native context menu will be replaced by the JET Menu specified in this slot.

The application can register a listener for the Menu's ojBeforeOpen event. The listener can cancel the launch via event.preventDefault(), or it can customize the menu contents by editing the menu DOM directly, and then calling refresh() on the Menu.

To help determine whether it's appropriate to cancel the launch or customize the menu, the ojBeforeOpen listener can use component API's to determine which table cell, chart item, etc., is the target of the context menu. See the JSDoc of the individual components for details.

Keep in mind that any such logic must work whether the context menu was launched via right-click, Shift-F10, Press & Hold, or component-specific touch gesture.

itemTemplate

PREVIEW: This is a preview API. Preview APIs are production quality, but can be changed on a major version without a deprecation path.

The itemTemplate slot is used to specify the template for creating each item of the timeline. The slot must be a <template> element. The content of the template should only be one <oj-timeline-item> element. The reference data provider is that of the data attribute. See the oj-timeline-item doc for more details. The series-id is optional if there is only one series; otherwise it must be specified. Note that if an invalid value for item start is specified, then the item is not rendered; if all the items belonging to a series are not rendered, the series will appear as an empty series.

When the template is executed for each item, it will have access to the timeline's binding context containing the following properties:

  • $current - an object that contains information for the current item. (See the table below for a list of properties available on $current)
Properties of $current:
Name Type Description
componentElement Element The <oj-timeline> custom element
data Object The data object for the current item
index number The zero-based index of the curent item
key any The key of the current item

seriesTemplate

PREVIEW: This is a preview API. Preview APIs are production quality, but can be changed on a major version without a deprecation path.

The seriesTemplate slot is used to specify the template for generating the series properties of the timeline. The slot must be a <template> element. The content of the template should only be one <oj-timeline-series> element.See the oj-timeline-series doc for more details. See also the itemTemplate regarding showing empty series. Note that the series will render following the order in which they are found in the data.

When the template is executed for each series, it will have access to the timeline's binding context containing the following properties:

  • $current - an object that contains information for the current series. (See the table below for a list of properties available on $current)
Properties of $current:
Name Type Description
componentElement Element The <oj-timeline> custom element
index number The series index
id any The series id
items Array.<Object> The array of objects which are timeline items that belong to this series. The objects will have the following properties
Properties
Name Type Description
data Object The data object for the item
index number The zero-based index of the item
key any The key of the item

tooltipTemplate

PREVIEW: This is a preview API. Preview APIs are production quality, but can be changed on a major version without a deprecation path.

The tooltipTemplate slot is used to specify custom tooltip content. This slot takes precedence over the tooltip.renderer property if specified.

When the template is executed, the component's binding context is extended with the following properties:

  • $current - an object that contains information for the current item. (See oj.ojTimeline.TooltipContext for a list of properties available on $current)

Attributes

animation-on-data-change :"auto"|"none"

Specifies the animation that is applied on data changes.
Supported Values:
Value
"auto"
"none"
Default Value:
  • "none"
Names
Item Name
Property animationOnDataChange
Property change event animationOnDataChangeChanged
Property change listener attribute (must be of type function) on-animation-on-data-change-changed

animation-on-display :"auto"|"none"

Specifies the animation that is shown on initial display.
Supported Values:
Value
"auto"
"none"
Default Value:
  • "none"
Names
Item Name
Property animationOnDisplay
Property change event animationOnDisplayChanged
Property change listener attribute (must be of type function) on-animation-on-display-changed

(nullable) data :(DataProvider<K, D>)

The oj.DataProvider for the items of the timeline. It should provide data rows where each row maps data for a single timeline item. The row key will be used as the id for timeline items. The oj.DataProvider can either have an arbitrary data shape, in which case a template for the itemTemplate slot must be provided, or it can have ojTimeline.DataItem as its data shape, in which case no template is required. Providing a template for the seriesTemplate slot for generating the timeline series properties is optional.
Default Value:
  • null
Names
Item Name
Property data
Property change event dataChanged
Property change listener attribute (must be of type function) on-data-changed

end :string

The end time of the timeline. A valid value is required in order for the timeline to properly render. See Date and Time Formats for more details on the required string formats.
Default Value:
  • ""
Names
Item Name
Property end
Property change event endChanged
Property change listener attribute (must be of type function) on-end-changed

(nullable) major-axis :Object

An object with the following properties, used to define a timeline axis. If not specified, no axis labels will be shown above the minor axis or in the overview.
Names
Item Name
Property majorAxis
Property change event majorAxisChanged
Property change listener attribute (must be of type function) on-major-axis-changed

(nullable) major-axis.converter :(oj.ojTimeAxis.Converters|oj.Converter.<string>)

A converter (an instance that duck types oj.Converter) used to format the labels of the major axis for all 'scale' values, or an object literal whose keys are 'scale' values that map specific converters for scale specific formatting (see oj.ojTimeAxis.Converters). See oj.DateTimeConverterFactory for details on creating built-in datetime converters.

See the major-axis attribute for usage examples.
Default Value:
  • {"default": null, "seconds": oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME).createConverter({'hour': 'numeric', 'minute': '2-digit', 'second': '2-digit'}), "minutes": oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME).createConverter({'hour': 'numeric', 'minute': '2-digit'}), "hours": oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME).createConverter({'hour': 'numeric'}), "days": oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME).createConverter({'month': 'numeric', 'day': '2-digit'}), "weeks": oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME).createConverter({'month': 'numeric', 'day': '2-digit'}), "months": oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME).createConverter({'month': 'long'}), "quarters": oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME).createConverter({'month': 'long'}), "years": oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME).createConverter({'year': 'numeric'})}
Names
Item Name
Property majorAxis.converter

(nullable) major-axis.scale :"seconds"|"minutes"|"hours"|"days"|"weeks"|"months"|"quarters"|"years"

The time scale used for the major axis. If not specified, no axis labels will be shown above the minor axis or in the overview.

See the major-axis attribute for usage examples.
Supported Values:
Value
"days"
"hours"
"minutes"
"months"
"quarters"
"seconds"
"weeks"
"years"
Default Value:
  • null
Names
Item Name
Property majorAxis.scale

major-axis.svg-style :CSSStyleDeclaration

The CSS style object defining any additional styling of the axis. If not specified, no additional styling will be applied.

See the major-axis attribute for usage examples.
Default Value:
  • {}
Names
Item Name
Property majorAxis.svgStyle

minor-axis :Object

An object with the following properties, used to define a timeline axis. This is required in order for the timeline to properly render.
Names
Item Name
Property minorAxis
Property change event minorAxisChanged
Property change listener attribute (must be of type function) on-minor-axis-changed

(nullable) minor-axis.converter :(oj.ojTimeAxis.Converters|oj.Converter.<string>)

A converter (an instance that duck types oj.Converter) used to format the labels of the minor axis for all 'scale' values, or an object literal whose keys are 'scale' values that map specific converters for scale specific formatting (see oj.ojTimeAxis.Converters). See oj.DateTimeConverterFactory for details on creating built-in datetime converters.

See the minor-axis attribute for usage examples.
Default Value:
  • {"default": null, "seconds": oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME).createConverter({'hour': 'numeric', 'minute': '2-digit', 'second': '2-digit'}), "minutes": oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME).createConverter({'hour': 'numeric', 'minute': '2-digit'}), "hours": oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME).createConverter({'hour': 'numeric'}), "days": oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME).createConverter({'month': 'numeric', 'day': '2-digit'}), "weeks": oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME).createConverter({'month': 'numeric', 'day': '2-digit'}), "months": oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME).createConverter({'month': 'long'}), "quarters": oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME).createConverter({'month': 'long'}), "years": oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME).createConverter({'year': 'numeric'})}
Names
Item Name
Property minorAxis.converter

(nullable) minor-axis.scale :"seconds"|"minutes"|"hours"|"days"|"weeks"|"months"|"quarters"|"years"

The time scale used for the minor axis. This is required in order for the timeline to properly render.

See the minor-axis attribute for usage examples.
Supported Values:
Value
"days"
"hours"
"minutes"
"months"
"quarters"
"seconds"
"weeks"
"years"
Default Value:
  • null
Names
Item Name
Property minorAxis.scale

minor-axis.svg-style :CSSStyleDeclaration

The CSS style object defining any additional styling of the axis. If not specified, no additional styling will be applied.

See the minor-axis attribute for usage examples.
Default Value:
  • {}
Names
Item Name
Property minorAxis.svgStyle

(nullable) minor-axis.zoom-order :Array.<string>

An array of strings containing the names of scales used for zooming from longest to shortest. If not specified, the 'scale' specified on the axis will be used at all zoom levels.

See the minor-axis attribute for usage examples.
Default Value:
  • null
Names
Item Name
Property minorAxis.zoomOrder

orientation :"vertical"|"horizontal"

The orientation of the element.
Supported Values:
Value
"horizontal"
"vertical"
Default Value:
  • "horizontal"
Names
Item Name
Property orientation
Property change event orientationChanged
Property change listener attribute (must be of type function) on-orientation-changed

(nullable) overview :Object

An object with the following properties, used to define a timeline overview. If not specified, no overview will be shown.
Names
Item Name
Property overview
Property change event overviewChanged
Property change listener attribute (must be of type function) on-overview-changed

(nullable) overview.rendered :string

Specifies whether the overview scrollbar is rendered.

See the overview attribute for usage examples.
Supported Values:
Value
"off"
"on"
Default Value:
  • "off"
Names
Item Name
Property overview.rendered

overview.svg-style :CSSStyleDeclaration

The CSS style object defining any additional styling of the overview. If not specified, no additional styling will be applied.

See the overview attribute for usage examples.
Default Value:
  • {}
Names
Item Name
Property overview.svgStyle

reference-objects :Array.<oj.ojTimeline.ReferenceObject>

The array of reference objects associated with the timeline. For each reference object, a line is rendered at the specified value. Currently only the first reference object in the array is supported. Any additional objects supplied in the array will be ignored.
Default Value:
  • []
Names
Item Name
Property referenceObjects
Property change event referenceObjectsChanged
Property change listener attribute (must be of type function) on-reference-objects-changed

selection :K[]

An array of strings containing the ids of the initially selected items.
Default Value:
  • []
Supports writeback:
  • true
Names
Item Name
Property selection
Property change event selectionChanged
Property change listener attribute (must be of type function) on-selection-changed

selection-mode :"single"|"multiple"|"none"

The type of selection behavior that is enabled on the timeline. If 'single' is specified, only a single item across all series can be selected at once. If 'multiple', any number of items across all series can be selected at once. Otherwise, selection is disabled.
Supported Values:
Value
"multiple"
"none"
"single"
Default Value:
  • "none"
Names
Item Name
Property selectionMode
Property change event selectionModeChanged
Property change listener attribute (must be of type function) on-selection-mode-changed

(nullable) series :(Array.<oj.ojTimeline.Series>|Promise.<Array.<oj.ojTimeline.Series>>|null)

An array of objects with the following properties, used to define a timeline series. Also accepts a Promise that will resolve with an array for deferred data rendering. No data will be rendered if the Promise is rejected.
Type details
Setter Type(Array.<oj.ojTimeline.Series>|Promise.<Array.<oj.ojTimeline.Series>>|null)
Getter Type(Promise.<Array.<oj.ojTimeline.Series>>|null)
Default Value:
  • null
Names
Item Name
Property series
Property change event seriesChanged
Property change listener attribute (must be of type function) on-series-changed
Example

set or get series property:

let elem = document.getElementById('timeline') as ojTimeline;
//set series to Promise. Assuming that getSeries is a method which returns type Promise>
elem.series = getSeries();
//or
elem.set('series', getSeries());

//set series to an array of ojNBox.Row
let series = [
    {
        "id": "s1",
        "emptyText": "No Tournaments Played.",
        "label": "Rafael Nadal: 75-7",
        "items": [
            {
                "id": "e1",
                "title":"ATP VTR Open",
                "start": "2013-02-04",
                "description":"Finalist: 3-1"
            },
            {
                "id": "e2",
                "title":"ATP Brasil Open",
                "start": "2013-02-11",
                "description":"Champion: 4-0"
            }
        ]
    },
    {
        "id": "s2",
        "emptyText": "No Tournaments Played.",
        "label": "Novak Djokovic: 74-9",
        "items": [
            {
                "id": "e101",
                "title":"AUSTRALIAN OPEN",
                "start": "2013-01-14",
                "description":"Champion: 7-0"
            },
            {
                "id": "e102",
                "title":"Davis Cup World Group Round 1n",
                "start": "2013-02-01",
                "description":"Results: 1-0"
            },
            {
                "id": "e103",
                "title":"ATP Dubai Duty Free Tennis Championships",
                "start": "2013-02-25",
                "description":"Champion: 5-0"
            }
        ]
    }
];
//elem.series = series; Please note this wont compile. Use the format below
elem.set('series', series);

//get series property value
let seriesVal = elem.series; //This is guaranteed to be of the type Promise>|null

//reset the value of series to its default,
elem.unset('series');

start :string

The start time of the timeline. A valid value is required in order for the timeline to properly render. See Date and Time Formats for more details on the required string formats.
Default Value:
  • ""
Names
Item Name
Property start
Property change event startChanged
Property change listener attribute (must be of type function) on-start-changed

style-defaults :Object

An object with the following properties, used to define default styling for the timeline. Component CSS classes should be used to set component wide styling. This API should be used only for styling a specific instance of the component. Properties specified on this object may be overridden by specifications on the data item. Some property default values come from the CSS and varies based on theme.
Names
Item Name
Property styleDefaults
Property change event styleDefaultsChanged
Property change listener attribute (must be of type function) on-style-defaults-changed

(nullable) style-defaults.animation-duration :number

The duration of the animations in milliseconds. The default value comes from the CSS and varies based on theme. For data change animations with multiple stages, this attribute defines the duration of each stage. For example, if an animation contains two stages, the total duration will be two times this attribute's value.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.animationDuration

(nullable) style-defaults.border-color :string

The border color of the timeline. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.borderColor

(nullable) style-defaults.item :Object

An object with the following properties, used to define the default styling for the timeline items.

See the style-defaults attribute for usage examples.
Default Value:
  • {}
Names
Item Name
Property styleDefaults.item

(nullable) style-defaults.item.background-color :string

The background color of the timeline items. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.item.backgroundColor

(nullable) style-defaults.item.border-color :string

The border color of the timeline items. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.item.borderColor

style-defaults.item.description-style :CSSStyleDeclaration

The CSS style object defining the style of the timeline item description text. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.item.descriptionStyle

(nullable) style-defaults.item.hover-background-color :string

The background color of the highlighted timeline items. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.item.hoverBackgroundColor

(nullable) style-defaults.item.hover-border-color :string

The border color of the highlighted timeline items. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.item.hoverBorderColor

(nullable) style-defaults.item.selected-background-color :string

The background color of the selected timeline items. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.item.selectedBackgroundColor

(nullable) style-defaults.item.selected-border-color :string

The border color of the selected timeline items. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.item.selectedBorderColor

style-defaults.item.title-style :CSSStyleDeclaration

The CSS style object defining the style of the timeline item title text. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.item.titleStyle

(nullable) style-defaults.major-axis :Object

An object with the following properties, used to define the default styling for the major time axis.

See the style-defaults attribute for usage examples.
Default Value:
  • {}
Names
Item Name
Property styleDefaults.majorAxis

style-defaults.major-axis.label-style :CSSStyleDeclaration

The CSS style object defining the style of the major time axis label text. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.majorAxis.labelStyle

(nullable) style-defaults.major-axis.separator-color :string

The color of the major time axis separators. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.majorAxis.separatorColor

(nullable) style-defaults.minor-axis :Object

An object with the following properties, used to define the default styling for the time axis.

See the style-defaults attribute for usage examples.
Default Value:
  • {}
Names
Item Name
Property styleDefaults.minorAxis

(nullable) style-defaults.minor-axis.background-color :string

The background color of the time axis. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.minorAxis.backgroundColor

(nullable) style-defaults.minor-axis.border-color :string

The border color of the time axis. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.minorAxis.borderColor

style-defaults.minor-axis.label-style :CSSStyleDeclaration

The CSS style object defining the style of the time axis label text. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.minorAxis.labelStyle

(nullable) style-defaults.minor-axis.separator-color :string

The color of the time axis separators. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.minorAxis.separatorColor

(nullable) style-defaults.overview :Object

An object with the following properties, used to define the default styling for the timeline overview.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.overview

(nullable) style-defaults.overview.background-color :string

The background color of the timeline overview. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.overview.backgroundColor

style-defaults.overview.label-style :CSSStyleDeclaration

The CSS style object defining the style of the timeline overview label text. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.overview.labelStyle

(nullable) style-defaults.overview.window :Object

An object with the following properties, used to define the default styling for the timeline overview window.

See the style-defaults attribute for usage examples.
Default Value:
  • {}
Names
Item Name
Property styleDefaults.overview.window

(nullable) style-defaults.overview.window.background-color :string

The background color of the timeline overview window. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.overview.window.backgroundColor

(nullable) style-defaults.overview.window.border-color :string

The border color of the timeline overview window. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.overview.window.borderColor

(nullable) style-defaults.reference-object :Object

An object with the following properties, used to define the default styling for the reference objects.

See the style-defaults attribute for usage examples.
Default Value:
  • {}
Names
Item Name
Property styleDefaults.referenceObject

(nullable) style-defaults.reference-object.color :string

The color of the reference objects. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.referenceObject.color

(nullable) style-defaults.series :Object

An object with the following properties, used to define the default styling for the timeline series.

See the style-defaults attribute for usage examples.
Default Value:
  • {}
Names
Item Name
Property styleDefaults.series

(nullable) style-defaults.series.background-color :string

The background color of the series. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.series.backgroundColor

(nullable) style-defaults.series.colors :Array.<string>

The array defining the default color ramp for the series items.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.series.colors

style-defaults.series.empty-text-style :CSSStyleDeclaration

The CSS style object defining the style of the series empty text. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.series.emptyTextStyle

style-defaults.series.label-style :CSSStyleDeclaration

The CSS style object defining the style of the series label text. The default value comes from the CSS and varies based on theme.

See the style-defaults attribute for usage examples.
Names
Item Name
Property styleDefaults.series.labelStyle

tooltip :Object

An object containing an optional callback function for tooltip customization.
Default Value:
  • {"renderer": null}
Names
Item Name
Property tooltip
Property change event tooltipChanged
Property change listener attribute (must be of type function) on-tooltip-changed

(nullable) tooltip.renderer :((context: ojTimeline.TooltipContext<K, D>) => ({insert: Element|string}|{preventDefault: boolean}))

A function that returns a custom tooltip. Note that the default is for a tooltip to be displayed.

See the tooltip attribute for usage examples.
Default Value:
  • null
Names
Item Name
Property tooltip.renderer

track-resize :"on"|"off"

Defines whether the element will automatically render in response to changes in size. If set to off, then the application is responsible for calling refresh to render the element at the new size.
Supported Values:
Value
"off"
"on"
Default Value:
  • "on"
Names
Item Name
Property trackResize
Property change event trackResizeChanged
Property change listener attribute (must be of type function) on-track-resize-changed

translations :object|null

A collection of translated resources from the translation bundle, or null if this component has no resources. Resources may be accessed and overridden individually or collectively, as seen in the examples.

If the component does not contain any translatable resource, the default value of this attribute will be null. If not, an object containing all resources relevant to the component.

If this component has translations, their documentation immediately follows this doc entry.

Names
Item Name
Property translations
Property change event translationsChanged
Property change listener attribute (must be of type function) on-translations-changed

(nullable) translations.accessible-item-desc :string

Provides properties to customize the screen reader text describing an item's description text.

Default Value:
  • "Description is {0}."
Since:
  • 3.0.0
Names
Item Name
Property translations.accessibleItemDesc

(nullable) translations.accessible-item-end :string

Provides properties to customize the screen reader text describing an item's end time.

Default Value:
  • "End time is {0}."
Since:
  • 3.0.0
Names
Item Name
Property translations.accessibleItemEnd

(nullable) translations.accessible-item-start :string

Provides properties to customize the screen reader text describing an item's start time.

Default Value:
  • "Start time is {0}."
Since:
  • 3.0.0
Names
Item Name
Property translations.accessibleItemStart

(nullable) translations.accessible-item-title :string

Provides properties to customize the screen reader text describing an item's title text.

Default Value:
  • "Title is {0}."
Since:
  • 3.0.0
Names
Item Name
Property translations.accessibleItemTitle

(nullable) translations.component-name :string

Used to describe the data visualization type for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Timeline"
Names
Item Name
Property translations.componentName

(nullable) translations.label-and-value :string

Used to display a label and its value.

See the translations attribute for usage examples.

Default Value:
  • "{0}: {1}"
Names
Item Name
Property translations.labelAndValue

(nullable) translations.label-clear-selection :string

Text shown for clearing multiple selection on touch devices.

See the translations attribute for usage examples.

Default Value:
  • "Clear Selection"
Names
Item Name
Property translations.labelClearSelection

(nullable) translations.label-count-with-total :string

Used to display a count out of a total.

See the translations attribute for usage examples.

Default Value:
  • "{0} of {1}"
Names
Item Name
Property translations.labelCountWithTotal

(nullable) translations.label-data-visualization :string

Label for data visualizations used for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Data Visualization"
Names
Item Name
Property translations.labelDataVisualization

(nullable) translations.label-date :string

Used for the default tooltip label for instance item information.

See the translations attribute for usage examples.

Default Value:
  • "Date"
Since:
  • 6.0.0
Names
Item Name
Property translations.labelDate

(nullable) translations.label-description :string

Used for the default tooltip label for item description information.

See the translations attribute for usage examples.

Default Value:
  • "Description"
Since:
  • 6.0.0
Names
Item Name
Property translations.labelDescription

(nullable) translations.label-end :string

Used for the default tooltip label for end time information.

See the translations attribute for usage examples.

Default Value:
  • "End"
Since:
  • 6.0.0
Names
Item Name
Property translations.labelEnd

(nullable) translations.label-invalid-data :string

Text shown when the component receives invalid data.

See the translations attribute for usage examples.

Default Value:
  • "Invalid data"
Names
Item Name
Property translations.labelInvalidData

(nullable) translations.label-no-data :string

Text shown when the component receives no data.

See the translations attribute for usage examples.

Default Value:
  • "No data to display"
Names
Item Name
Property translations.labelNoData

(nullable) translations.label-series :string

Used for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Series"
Names
Item Name
Property translations.labelSeries

(nullable) translations.label-start :string

Used for the default tooltip label for start time information.

See the translations attribute for usage examples.

Default Value:
  • "Start"
Since:
  • 6.0.0
Names
Item Name
Property translations.labelStart

(nullable) translations.label-title :string

Used for the default tooltip label for item title information.

See the translations attribute for usage examples.

Default Value:
  • "Title"
Since:
  • 6.0.0
Names
Item Name
Property translations.labelTitle

(nullable) translations.state-collapsed :string

Used to describe the collapsed state for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Collapsed"
Names
Item Name
Property translations.stateCollapsed

(nullable) translations.state-drillable :string

Used to describe a drillable object for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Drillable"
Names
Item Name
Property translations.stateDrillable

(nullable) translations.state-expanded :string

Used to describe the expanded state for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Expanded"
Names
Item Name
Property translations.stateExpanded

(nullable) translations.state-hidden :string

Used to describe the hidden state for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Hidden"
Names
Item Name
Property translations.stateHidden

(nullable) translations.state-isolated :string

Used to describe the isolated state for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Isolated"
Names
Item Name
Property translations.stateIsolated

(nullable) translations.state-maximized :string

Used to describe the maximized state for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Maximized"
Names
Item Name
Property translations.stateMaximized

(nullable) translations.state-minimized :string

Used to describe the minimized state for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Minimized"
Names
Item Name
Property translations.stateMinimized

(nullable) translations.state-selected :string

Used to describe the selected state for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Selected"
Names
Item Name
Property translations.stateSelected

(nullable) translations.state-unselected :string

Used to describe the unselected state for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Unselected"
Names
Item Name
Property translations.stateUnselected

(nullable) translations.state-visible :string

Used to describe the visible state for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Visible"
Names
Item Name
Property translations.stateVisible

(nullable) translations.tooltip-zoom-in :string

Used for the zoom in tooltip.

See the translations attribute for usage examples.

Default Value:
  • "Zoom In"
Names
Item Name
Property translations.tooltipZoomIn

(nullable) translations.tooltip-zoom-out :string

Used for the zoom out tooltip.

See the translations attribute for usage examples.

Default Value:
  • "Zoom Out"
Names
Item Name
Property translations.tooltipZoomOut

value-formats :Object

An object specifying value formatting and tooltip behavior, whose keys generally correspond to item properties.
Names
Item Name
Property valueFormats
Property change event valueFormatsChanged
Property change listener attribute (must be of type function) on-value-formats-changed

(nullable) value-formats.date :Object

Specifies tooltip behavior for the date value of an instance item.

See the value-formats attribute for usage examples.
Names
Item Name
Property valueFormats.date

(nullable) value-formats.date.converter :(Converter<string>)

A converter (an instance that duck types oj.Converter) used to format the label. If not specified, a default converter depending on the axes scale is used. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.

See the value-formats attribute for usage examples.
Default Value:
  • null
Names
Item Name
Property valueFormats.date.converter

(nullable) value-formats.date.tooltip-display :string

Whether the value is displayed in the tooltip.

See the value-formats attribute for usage examples.
Supported Values:
Value
"auto"
"off"
Default Value:
  • "auto"
Names
Item Name
Property valueFormats.date.tooltipDisplay

(nullable) value-formats.date.tooltip-label :string

A string representing the label that is displayed before the value in the tooltip. The default value comes from oj.ojTimeline.translations.labelDate.

See the value-formats attribute for usage examples.
Names
Item Name
Property valueFormats.date.tooltipLabel

(nullable) value-formats.description :Object

Specifies tooltip behavior for the description value.

See the value-formats attribute for usage examples.
Names
Item Name
Property valueFormats.description

(nullable) value-formats.description.tooltip-display :string

Whether the value is displayed in the tooltip.

See the value-formats attribute for usage examples.
Supported Values:
Value
"auto"
"off"
Default Value:
  • "off"
Names
Item Name
Property valueFormats.description.tooltipDisplay

(nullable) value-formats.description.tooltip-label :string

A string representing the label that is displayed before the value in the tooltip. The default value comes from oj.ojTimeline.translations.labelDescription.

See the value-formats attribute for usage examples.
Names
Item Name
Property valueFormats.description.tooltipLabel

(nullable) value-formats.end :Object

Specifies tooltip behavior for the end value.

See the value-formats attribute for usage examples.
Names
Item Name
Property valueFormats.end

(nullable) value-formats.end.converter :(Converter<string>)

A converter (an instance that duck types oj.Converter) used to format the label. If not specified, a default converter depending on the axes scale is used. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.

See the value-formats attribute for usage examples.
Default Value:
  • null
Names
Item Name
Property valueFormats.end.converter

(nullable) value-formats.end.tooltip-display :string

Whether the value is displayed in the tooltip.

See the value-formats attribute for usage examples.
Supported Values:
Value
"auto"
"off"
Default Value:
  • "auto"
Names
Item Name
Property valueFormats.end.tooltipDisplay

(nullable) value-formats.end.tooltip-label :string

A string representing the label that is displayed before the value in the tooltip. The default value comes from oj.ojTimeline.translations.labelEnd.

See the value-formats attribute for usage examples.
Names
Item Name
Property valueFormats.end.tooltipLabel

(nullable) value-formats.series :Object

Specifies tooltip behavior for the series value.

See the value-formats attribute for usage examples.
Names
Item Name
Property valueFormats.series

(nullable) value-formats.series.tooltip-display :string

Whether the value is displayed in the tooltip.

See the value-formats attribute for usage examples.
Supported Values:
Value
"auto"
"off"
Default Value:
  • "off"
Names
Item Name
Property valueFormats.series.tooltipDisplay

(nullable) value-formats.series.tooltip-label :string

A string representing the label that is displayed before the value in the tooltip. The default value comes from oj.ojTimeline.translations.labelSeries.

See the value-formats attribute for usage examples.
Names
Item Name
Property valueFormats.series.tooltipLabel

(nullable) value-formats.start :Object

Specifies tooltip behavior for the start value.

See the value-formats attribute for usage examples.
Names
Item Name
Property valueFormats.start

(nullable) value-formats.start.converter :(Converter<string>)

A converter (an instance that duck types oj.Converter) used to format the label. If not specified, a default converter depending on the axes scale is used. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.

See the value-formats attribute for usage examples.
Default Value:
  • null
Names
Item Name
Property valueFormats.start.converter

(nullable) value-formats.start.tooltip-display :string

Whether the value is displayed in the tooltip.

See the value-formats attribute for usage examples.
Supported Values:
Value
"auto"
"off"
Default Value:
  • "auto"
Names
Item Name
Property valueFormats.start.tooltipDisplay

(nullable) value-formats.start.tooltip-label :string

A string representing the label that is displayed before the value in the tooltip. The default value comes from oj.ojTimeline.translations.labelStart.

See the value-formats attribute for usage examples.
Names
Item Name
Property valueFormats.start.tooltipLabel

(nullable) value-formats.title :Object

Specifies tooltip behavior for the title value.

See the value-formats attribute for usage examples.
Names
Item Name
Property valueFormats.title

(nullable) value-formats.title.tooltip-display :string

Whether the value is displayed in the tooltip.

See the value-formats attribute for usage examples.
Supported Values:
Value
"auto"
"off"
Default Value:
  • "off"
Names
Item Name
Property valueFormats.title.tooltipDisplay

(nullable) value-formats.title.tooltip-label :string

A string representing the label that is displayed before the value in the tooltip. The default value comes from oj.ojTimeline.translations.labelTitle.

See the value-formats attribute for usage examples.
Names
Item Name
Property valueFormats.title.tooltipLabel

viewport-end :string

The end time of the timeline's viewport. If not specified or invalid, this will default to a value determined by the initial 'scale' of the minor axis and the width of the timeline. See Date and Time Formats for more details on the required string formats.
Default Value:
  • ""
Names
Item Name
Property viewportEnd
Property change event viewportEndChanged
Property change listener attribute (must be of type function) on-viewport-end-changed

viewport-start :string

The start time of the timeline's viewport. If not specified or invalid, this will default to a value determined by the initial 'scale' of the minor axis and the width of the timeline. See Date and Time Formats for more details on the required string formats.
Default Value:
  • ""
Names
Item Name
Property viewportStart
Property change event viewportStartChanged
Property change listener attribute (must be of type function) on-viewport-start-changed

Context Objects

Each context object contains, at minimum, a subId property, whose value is a string that identifies a particular DOM node in this element. It can have additional properties to further specify the desired node. See getContextByNode for more details.

Properties:
Name Type Description
subId string Sub-id string to identify a particular dom node.

Following are the valid subIds:

oj-timeline-item

Context for timeline series items indexed by series and item indices.

Properties:
Name Type
seriesIndex number
itemIndex number

Events

ojViewportChange

Triggered after the viewport is changed due to a zoom or scroll operation.
Properties:

All of the event payloads listed below can be found under event.detail.

Name Type Description
viewportStart string the start of the new viewport on a timeline
viewportEnd string the end of the new viewport on a timeline
minorAxisScale string the time scale of the minor axis

Methods

getContextByNode(node) → {(oj.ojTimeline.NodeContext|null)}

Returns an object with context for the given child DOM node. This will always contain the subid for the node, defined as the 'subId' property on the context object. Additional component specific information may also be included. For more details on returned objects, see context objects.
Parameters:
Name Type Argument Description
node Element <not nullable>
The child DOM node
Returns:
The context for the DOM node, or null when none is found.
Type
(oj.ojTimeline.NodeContext|null)

getProperty(property) → {any}

Retrieves the value of a property or a subproperty. The return type will be the same as the type of the property as specified in this API document. If the method is invoked with an incorrect property/subproperty name, it returns undefined.
Parameters:
Name Type Description
property string The property name to get. Supports dot notation for subproperty access.
Since:
  • 4.0.0
Returns:
Type
any
Example

Get a single subproperty of a complex property:

let subpropValue = myComponent.getProperty('complexProperty.subProperty1.subProperty2');

refresh() → {void}

Refreshes the component.
Returns:
Type
void

setProperties(properties) → {void}

Performs a batch set of properties. The type of value for each property being set must match the type of the property as specified in this API document.
Parameters:
Name Type Description
properties Object An object containing the property and value pairs to set.
Since:
  • 4.0.0
Returns:
Type
void
Example

Set a batch of properties:

myComponent.setProperties({"prop1": "value1", "prop2.subprop": "value2", "prop3": "value3"});

setProperty(property, value) → {void}

Sets a property or a subproperty (of a complex property) and notifies the component of the change, triggering a [property]Changed event. The value should be of the same type as the type of the attribute mentioned in this API document.
Parameters:
Name Type Description
property string The property name to set. Supports dot notation for subproperty access.
value any The new value to set the property to.
Since:
  • 4.0.0
Returns:
Type
void
Example

Set a single subproperty of a complex property:

myComponent.setProperty('complexProperty.subProperty1.subProperty2', "someValue");

Type Definitions

DataItem

Object type that defines a timeline data item for the no template case.
Properties:
Name Type Argument Default Description
seriesId string The id for the row the task belongs to.
title string <optional>
The title text displayed on the timeline item. If not specified, no title will be shown.
description string <optional>
"" The description text displayed on the timeline item. If not specified, no description will be shown.
durationFillColor string <optional>
null The color applied to the duration bar of the timeline item. If not specified, this will be determined by the color ramp of the series.
end string <optional>
"" The end time of this timeline item. If not specified, no duration bar will be shown. See Date and Time Formats for more details on the required string formats.
shortDesc string <optional>
null The description of the item. This is used for accessibility and for customizing the tooltip text.
start string "" The start time of this timeline item. This is required in order for the timeline item to properly render. See Date and Time Formats for more details on the required string formats.
svgStyle CSSStyleDeclaration <optional>
The CSS style defining any additional styling of the item. If not specified, no additional styling will be applied.
thumbnail string <optional>
"" An optional URI specifying the location of an image resource to be displayed on the item. The image will be rendered at 32px x 32px in size. If not specified, no thumbnail will be shown.

NodeContext

Properties:
Name Type Description
subId string The subId string to identify the particular DOM node.
seriesIndex number The zero based index of the timeline series.
itemIndex number The zero based index of the timeline series item.

ReferenceObject

Properties:
Name Type Argument Description
value string <optional>
The time value of this reference object. If not specified, no reference object will be shown. See Date and Time Formats for more details on the required string formats.

Series<K>

Properties:
Name Type Argument Default Description
id string The identifier for the timeline series.
items Array.<oj.ojTimeline.SeriesItem.<K>> <optional>
An array of items. If not specified, no data will be shown in this series.
emptyText string <optional>
The text of an empty timeline series.
itemLayout "auto" | "bottomToTop" | "topToBottom" <optional>
"auto" The direction in which items are laid out when in a horizontal orientation. This attribute is ignored when in a vertical orientation.
label string <optional>
"" The label displayed on the timeline series. In not specified, no label will be shown.
svgStyle CSSStyleDeclaration <optional>
{} The CSS style object defining any additional styling of the series. If not specified, no additional styling will be applied.

SeriesItem<K>

Properties:
Name Type Argument Default Description
id K The identifier for the timeline item. This must be unique across all items in the timeline, and is required in order for the timeline to properly render.
title string <optional>
The title text displayed on the timeline item. If not specified, no title will be shown.
description string <optional>
"" The description text displayed on the timeline item. If not specified, no description will be shown.
durationFillColor string <optional>
null The color applied to the duration bar of the timeline item. If not specified, this will be determined by the color ramp of the series.
end string <optional>
"" The end time of this timeline item. If not specified, no duration bar will be shown. See Date and Time Formats for more details on the required string formats.
shortDesc string <optional>
null The description of the item. This is used for accessibility and for customizing the tooltip text.
start string "" The start time of this timeline item. This is required in order for the timeline item to properly render. See Date and Time Formats for more details on the required string formats.
svgStyle CSSStyleDeclaration <optional>
The CSS style defining any additional styling of the item. If not specified, no additional styling will be applied.
thumbnail string <optional>
"" An optional URI specifying the location of an image resource to be displayed on the item. The image will be rendered at 32px x 32px in size. If not specified, no thumbnail will be shown.

TooltipContext<K, D>

Properties:
Name Type Description
parentElement Element The tooltip element. This can be used to change the tooltip border or background color.
data oj.ojTimeline.SeriesItem.<K> The data object of the hovered item.
seriesData oj.ojTimeline.Series.<K> The data for the series the hovered item belongs to.
itemData D The data provider row data object for the hovered item. This will only be set if an oj.DataProvider for data is being used.
componentElement Element The timeline element.
color string The color of the hovered item.