Element: <oj-timeline>

Oracle® JavaScript Extension Toolkit (JET)
15.1.0

F83698-01

Since:
  • 1.1.0
Module:
  • ojtimeline

QuickNav

Attributes


Context Objects

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"}'
  data='[[dataProvider]]'>
</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 Panning: navigate forward and backward in time in horizontal/vertical orientation.
Pinch-Close/Spread-Open Zoom In/Out. In discrete viewport-navigation-mode, this is not supported.
Zoom Control Tap on "+" element Zoom In. In discrete viewport-navigation-mode, this is not supported.
Tap on "-" element Zoom Out. In discrete viewport-navigation-mode, this is not supported.
Overview Press on right/left side of window & Hold & Drag in right of left direction Zoom In/Out (resize overview window). In discrete viewport-navigation-mode, this is not supported.
Press & Hold on the body of window & Drag in right of left direction Pan (move overview window). In discrete viewport-navigation-mode, this is not supported.

Keyboard End User Information

*
Key Action
Tab Move focus to next element.
Shift + Tab Move focus to previous element.
F2 Toggle Actionable mode. Entering actionable mode enables keyboard action on elements inside the item bubble, including navigating between focusable elements inside the item bubble.
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). If discrete viewport-navigation-mode is enabled, Timeline will navigate to the next Nav Arrow from the first series item, and the previous Nav Arrow from the next Nav Arrow.
  • If currently in move (or resize) mode (see Ctrl + m, Alt + s, Alt + e), move the candidate position to the left by some amount of time. Upon entering move (or resize) mode, the amount of time is set to the scale of the minor axis. See PageUp or PageDown for information on changing the amount of time to move by.
RightArrow
  • Move focus and selection to next data item (on right). If discrete viewport-navigation-mode is enabled, Timeline will navigate between the previous Nav Arrow and the next Nav Arrow before going to the first item.
  • If currently in move (or resize) mode (see Ctrl + m, Alt + s, Alt + e), move the candidate position to the right by some amount of time. Upon entering move (or resize) mode, the amount of time is set to the scale of the minor axis. See PageUp or PageDown for information on changing the amount of time to move by.
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. In discrete viewport-navigation-mode, this is disabled.
- or _ Zoom out one level if zooming is enabled. In discrete viewport-navigation-mode, this is disabled.
PageUp or PageDown
  • Pan up / down if scrolling is enabled.
  • If currently in move (or resize) mode (see Ctrl + m, Alt + s, Alt + e), select the amount of time greater / less than the current move by amount in the following ramp: years, quarters, months, weeks, days, hours, minutes, seconds, milliseconds. For example, if the current move by amount is weeks, PageUp or PageDown would change the amount to months or days respectively.
Shift + PageUp Pan left in left-to-right locales. Pan right in right-to-left locales. In discrete viewport-navigation-mode, this changes the viewport to the next time frame.
Shift + PageDown Pan right in left-to-right locales. Pan left in right-to-left locales. In discrete viewport-navigation-mode, this changes the viewport to the previous time frame.
Ctrl + m When focus is on a task and dnd.move.tasks is enabled, enter move mode. See also the UpArrow, DownArrow, LeftArrow, RightArrow, PageUp or PageDown, Esc, and Enter sections for more information.
Alt + s When focus is on a task and task-defaults.resizable is enabled, enter resize (start) mode. See also the LeftArrow, RightArrow, PageUp or PageDown, Esc, and Enter sections for more information.
Alt + e When focus is on a task and task-defaults.resizable is enabled, enter resize (end) mode. See also the LeftArrow, RightArrow, PageUp or PageDown, Esc, and Enter sections for more information.
Esc Cancel drag, or exit move or resize mode, if currently dragging, or in move mode (see Ctrl + m) or resize mode (see Alt + s and Alt + e). Cancels actionable mode if currently in actionable mode.
Enter Finalize move or resize, if currently in move mode (see Ctrl + m) or resize mode (see Alt + s and Alt + e) respectively.

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. This is especially the case for a vertical timeline, where all the intervals are computed. For example, a vertical timeline spanning one year with a scale of seconds will compute (365 * 24 * 60) 525,600 intervals. Computing this many intervals can cause severe performance degradation on initial render.

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.


Usage

Signature:

interface TimelineElement<K, D extends oj.TimelineElement.DataItem|any>

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

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

For additional information visit:

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.

itemBubbleContentTemplate

The itemBubbleContentTemplate slot is used to specify custom item bubble content. The slot content must be a single <template> element. The item bubble is defined as the content within the bubble container of a timeline item. This template is restricted to non-duration timeline items.

Note that the (0,0) point is at the top left corner of the item bubble container in left-to-right reading direction, and at the top right corner in right-to-left reading direction. Depending on the custom content, the developer will need to adjust the positioning based on use case. Thus, it may be useful, especially when positioning custom content in right-to-left reading direction, to set overflow:visible style on the custom SVG content container accordingly.

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

itemTemplate

The itemTemplate slot is used to specify the template for creating each item of the timeline. The slot content must be a single <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 oj.ojTimeline.ItemTemplateContext or 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 current item
key any The key of the current item

seriesTemplate

The seriesTemplate slot is used to specify the template for generating the series properties of the timeline. The slot content must be a single <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 oj.ojTimeline.SeriesTemplateContext or the table below for a list of properties available on $current)
Properties of $current:
Name Type Description
componentElement Element The <oj-timeline> custom element
id any The series id
index number The series index
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

The tooltipTemplate slot is used to specify custom tooltip content. The slot content must be a single <template> element. 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 or the table below for a list of properties available on $current)
Properties of $current:
Name Type Description
color string The color of the hovered item.
componentElement Element The timeline element.
data oj.ojTimeline.SeriesItem.<K> The data object of the hovered item.
itemData D The data provider row data object for the hovered item. This will only be set if an DataProvider for data is being used.
parentElement Element The tooltip element. This can be used to change the tooltip border or background color.
seriesData oj.ojTimeline.Series.<K> The data for the series the hovered item belongs to.

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, see Events and Listeners for additional information.) 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, see Events and Listeners for additional information.) on-animation-on-display-changed

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

The 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 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, see Events and Listeners for additional information.) on-data-changed

dnd :Object

Enables drag and drop functionality.
Names
Item Name
Property dnd
Property change event dndChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-dnd-changed

(nullable) dnd.move :Object

Defines a subset of high level configurations for moving events in the timeline.

See the dnd attribute for usage examples.
Names
Item Name
Property dnd.move

(nullable) dnd.move.items :string

Enable or disable moving items to a different location within the same timeline series Currently only duration-event item type is supported (See Keyboard End User Information). See also ojMove.

See the dnd attribute for usage examples.
Supported Values:
Value Description
disabled Disable moving items
enabled Enable moving items
Default Value:
  • "disabled"
Names
Item Name
Property dnd.move.items

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, see Events and Listeners for additional information.) on-end-changed

item-defaults :Object

An object with the following properties, used to define default properties for items in the timeline.
Names
Item Name
Property itemDefaults
Property change event itemDefaultsChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-item-defaults-changed

(nullable) item-defaults.feelers :string

Turn item feelers on or off
Supported Values:
Value Description
off Hide feelers
on Show feelers
Default Value:
  • "off"
Names
Item Name
Property itemDefaults.feelers

(nullable) item-defaults.resizable :string

Enable or disable resizing items (currently only supported on item-type: duration-event) See also ojResize.
Supported Values:
Value Description
disabled Disable resize items
enabled Enable resize items
Default Value:
  • "disabled"
Names
Item Name
Property itemDefaults.resizable

(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, see Events and Listeners for additional information.) 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). The single converter option has been deprecated as of 11.0.0. Please avoid using this type as it will be removed in the future. See also oj.DateTimeConverter.

See the major-axis attribute for usage examples.
Deprecated:
Since Value Description
11.0.0 oj.Converter<string> this value will be removed in the future
Default Value:
  • {"default": null, "seconds": new DateTimeConverter.IntlDateTimeConverter({'hour': 'numeric', 'minute': '2-digit', 'second': '2-digit'}), "minutes": new DateTimeConverter.IntlDateTimeConverter({'hour': 'numeric', 'minute': '2-digit'}), "hours": new DateTimeConverter.IntlDateTimeConverter({'hour': 'numeric'}), "days": new DateTimeConverter.IntlDateTimeConverter({'month': 'numeric', 'day': '2-digit'}), "weeks": new DateTimeConverter.IntlDateTimeConverter({'month': 'numeric', 'day': '2-digit'}), "months": new DateTimeConverter.IntlDateTimeConverter({'month': 'long'}), "quarters": new DateTimeConverter.IntlDateTimeConverter({'month': 'long'}), "years": new DateTimeConverter.IntlDateTimeConverter({'year': 'numeric'})}
Names
Item Name
Property majorAxis.converter

(nullable) major-axis.scale :(string|DvtTimeComponentScale)

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. The scale must either be a scale string (see acceptable values) or a custom instance of DvtTimeComponentScale.
Supported Values:
Value
days
hours
minutes
months
quarters
seconds
weeks
years
Default Value:
  • null
Names
Item Name
Property majorAxis.scale

(nullable) major-axis.svg-style :Partial<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, see Events and Listeners for additional information.) 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). The single converter option has been deprecated as of 11.0.0. Please avoid using this type as it will be removed in the future. See also oj.DateTimeConverter.

See the minor-axis attribute for usage examples.
Deprecated:
Since Value Description
11.0.0 oj.Converter<string> this value will be removed in the future
Default Value:
  • {"default": null, "seconds": new DateTimeConverter.IntlDateTimeConverter({'hour': 'numeric', 'minute': '2-digit', 'second': '2-digit'}), "minutes": new DateTimeConverter.IntlDateTimeConverter({'hour': 'numeric', 'minute': '2-digit'}), "hours": new DateTimeConverter.IntlDateTimeConverter({'hour': 'numeric'}), "days": new DateTimeConverter.IntlDateTimeConverter({'month': 'numeric', 'day': '2-digit'}), "weeks": new DateTimeConverter.IntlDateTimeConverter({'month': 'numeric', 'day': '2-digit'}), "months": new DateTimeConverter.IntlDateTimeConverter({'month': 'long'}), "quarters": new DateTimeConverter.IntlDateTimeConverter({'month': 'long'}), "years": new DateTimeConverter.IntlDateTimeConverter({'year': 'numeric'})}
Names
Item Name
Property minorAxis.converter

(nullable) minor-axis.scale :(string|DvtTimeComponentScale)

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. The scale must either be a scale string (see acceptable values) or a custom instance of DvtTimeComponentScale.
Supported Values:
Value
days
hours
minutes
months
quarters
seconds
weeks
years
Default Value:
  • null
Names
Item Name
Property minorAxis.scale

(nullable) minor-axis.svg-style :Partial<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|DvtTimeComponentScale)>

An array of strings or instances of DvtTimeComponentScale used for zooming from longest to shortest. If not specified, the 'scale' specified on the axis will be used at all zoom levels. In discrete viewport-navigation-mode, this will not be used.

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, see Events and Listeners for additional information.) 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. Overview cannot be navigated when using the discrete viewport-navigation-mode.
Names
Item Name
Property overview
Property change event overviewChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) 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

(nullable) overview.svg-style :Partial<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.
Default Value:
  • []
Names
Item Name
Property referenceObjects
Property change event referenceObjectsChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) 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, see Events and Listeners for additional information.) on-selection-changed

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

The type of selection behavior that is enabled on the Timeline. This attribute controls the number of selections that can be made via selection gestures at any given time.

If single or multiple is specified, selection gestures will be enabled, and the Timeline's selection styling will be applied to all items specified by the selection attribute. If none is specified, selection gestures will be disabled, and the Timeline's selection styling will not be applied to any items specified by the selection attribute.

Changing the value of this attribute will not affect the value of the selection attribute.

Supported Values:
Value Description
multiple Multiple items can be selected at the same time.
none Selection is disabled.
single Only a single item can be selected at a time.
Default Value:
  • "none"
Names
Item Name
Property selectionMode
Property change event selectionModeChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) 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, see Events and Listeners for additional information.) 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, see Events and Listeners for additional information.) 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, see Events and Listeners for additional information.) 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

(nullable) style-defaults.item.description-style :Partial<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

(nullable) style-defaults.item.title-style :Partial<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

(nullable) style-defaults.major-axis.label-style :Partial<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

(nullable) style-defaults.minor-axis.label-style :Partial<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

(nullable) style-defaults.overview.label-style :Partial<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

(nullable) style-defaults.series.empty-text-style :Partial<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

(nullable) style-defaults.series.label-style :Partial<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, see Events and Listeners for additional information.) 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, see Events and Listeners for additional information.) 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, see Events and Listeners for additional information.) on-translations-changed

(nullable) translations.accessible-contains-controls :string

Used to describe a container that contains controls.

See the translations attribute for usage examples.

Since:
  • 13.0.0
Names
Item Name
Property translations.accessibleContainsControls

(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.item-move-cancelled :string

Used to indicate item move is cancelled for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Event move cancelled"
Since:
  • 12.0.0
Names
Item Name
Property translations.itemMoveCancelled

(nullable) translations.item-move-finalized :string

Used to indicate item move is finalized for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Event move finalized"
Since:
  • 12.0.0
Names
Item Name
Property translations.itemMoveFinalized

(nullable) translations.item-move-initiated :string

Used to indicate item move is initiated for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Event move initiated"
Since:
  • 12.0.0
Names
Item Name
Property translations.itemMoveInitiated

(nullable) translations.item-move-initiated-instruction :string

Used to indicate item move instructions for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Use the arrow keys to move"
Since:
  • 12.0.0
Names
Item Name
Property translations.itemMoveInitiatedInstruction

(nullable) translations.item-move-selection-info :string

Used to indicate whether other items are also selected during move.

See the translations attribute for usage examples.

Default Value:
  • "{0} others selected"
Since:
  • 12.0.0
Names
Item Name
Property translations.itemMoveSelectionInfo

(nullable) translations.item-resize-cancelled :string

Used to indicate item resize is cancelled for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Event resize cancelled"
Since:
  • 12.0.0
Names
Item Name
Property translations.itemResizeCancelled

(nullable) translations.item-resize-end-handle :string

Used to indicate item end resize handle for accessibility.

See the translations attribute for usage examples.

Deprecated:
Since Description
15.0.0 This is deprecated because it is not used by oj-timeline.
Default Value:
  • "Event resize end handle"
Since:
  • 15.0.0
Names
Item Name
Property translations.itemResizeEndHandle

(nullable) translations.item-resize-end-initiated :string

Used to indicate item resize end is initiated for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Event resize end initiated"
Since:
  • 12.0.0
Names
Item Name
Property translations.itemResizeEndInitiated

(nullable) translations.item-resize-finalized :string

Used to indicate item resize is finalized for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Event resize finalized"
Since:
  • 12.0.0
Names
Item Name
Property translations.itemResizeFinalized

(nullable) translations.item-resize-initiated-instruction :string

Used to indicate item resize instructions for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Use the arrow keys to resize"
Since:
  • 12.0.0
Names
Item Name
Property translations.itemResizeInitiatedInstruction

(nullable) translations.item-resize-selection-info :string

Used to indicate whether other items are also selected during item resize.

See the translations attribute for usage examples.

Default Value:
  • "{0} others selected"
Since:
  • 12.0.0
Names
Item Name
Property translations.itemResizeSelectionInfo

(nullable) translations.item-resize-start-handle :string

Used to indicate item start resize handle for accessibility.

See the translations attribute for usage examples.

Deprecated:
Since Description
15.0.0 This is deprecated because it is not used by oj-timeline.
Default Value:
  • "Event resize start handle"
Since:
  • 15.0.0
Names
Item Name
Property translations.itemResizeStartHandle

(nullable) translations.item-resize-start-initiated :string

Used to indicate item resize start is initiated for accessibility.

See the translations attribute for usage examples.

Default Value:
  • "Event resize start initiated"
Since:
  • 12.0.0
Names
Item Name
Property translations.itemResizeStartInitiated

(nullable) translations.label-acc-nav-next-page :string

Used for the discrete navigation mode next arrow aria-label.

See the translations attribute for usage examples.

Default Value:
  • "Next Page"
Since:
  • 11.1.0
Names
Item Name
Property translations.labelAccNavNextPage

(nullable) translations.label-acc-nav-previous-page :string

Used for the discrete navigation mode previous arrow aria-label.

See the translations attribute for usage examples.

Default Value:
  • "Previous Page"
Since:
  • 11.1.0
Names
Item Name
Property translations.labelAccNavPreviousPage

(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.

Deprecated:
Since Description
15.0.0 This is deprecated because it is not used by oj-timeline.
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-move-by :string

Used for the default tooltip label for item move scale change.

See the translations attribute for usage examples.

Default Value:
  • "Move By"
Since:
  • 12.0.0
Names
Item Name
Property translations.labelMoveBy

(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-resize-by :string

Used for the default tooltip label for item resize scale change.

See the translations attribute for usage examples.

Default Value:
  • "Resize By"
Since:
  • 12.0.0
Names
Item Name
Property translations.labelResizeBy

(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.nav-arrow-disabled-state :string

Used for the discrete navigation mode arrow ariaLabel text when disabled.

See the translations attribute for usage examples.

Default Value:
  • "Disabled"
Since:
  • 11.1.0
Names
Item Name
Property translations.navArrowDisabledState

(nullable) translations.state-collapsed :string

Used to describe the collapsed state for accessibility.

See the translations attribute for usage examples.

Deprecated:
Since Description
15.0.0 This is deprecated because it is not used by oj-timeline.
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.

Deprecated:
Since Description
15.0.0 This is deprecated because it is not used by oj-timeline.
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.

Deprecated:
Since Description
15.0.0 This is deprecated because it is not used by oj-timeline.
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.

Deprecated:
Since Description
15.0.0 This is deprecated because it is not used by oj-timeline.
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.

Deprecated:
Since Description
15.0.0 This is deprecated because it is not used by oj-timeline.
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.

Deprecated:
Since Description
15.0.0 This is deprecated because it is not used by oj-timeline.
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.

Deprecated:
Since Description
15.0.0 This is deprecated because it is not used by oj-timeline.
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.

Deprecated:
Since Description
15.0.0 This is deprecated because it is not used by oj-timeline.
Default Value:
  • "Visible"
Names
Item Name
Property translations.stateVisible

(nullable) translations.tip-arrow-next-page :string

Used for the discrete navigation mode next arrow alt text.

See the translations attribute for usage examples.

Deprecated:
Since Description
15.0.0 This is deprecated because it is not used by oj-timeline.
Default Value:
  • "Next"
Since:
  • 15.0.0
Names
Item Name
Property translations.tipArrowNextPage

(nullable) translations.tip-arrow-previous-page :string

Used for the discrete navigation mode previous arrow alt text.

See the translations attribute for usage examples.

Deprecated:
Since Description
15.0.0 This is deprecated because it is not used by oj-timeline.
Default Value:
  • "Previous"
Since:
  • 15.0.0
Names
Item Name
Property translations.tipArrowPreviousPage

(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, see Events and Listeners for additional information.) 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 also oj.DateTimeConverter.

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:
  • "auto"
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 also oj.DateTimeConverter.

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 also oj.DateTimeConverter.

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:
  • "auto"
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, see Events and Listeners for additional information.) on-viewport-end-changed

viewport-navigation-mode :"continuous"|"discrete"

Note: This attribute is not supported in the following themes: Alta

Specify the navigation mode for the timeline, continuous or discrete. If none specified, will behave as continuous.
Supported Values:
Value Description
continuous In continuous mode, users can pan horizontally and vertically, and zoom in and out throughout the entire timeline.
discrete In discrete mode only vertical panning is supported. Zooming is not supported. The viewport will use the viewport-start and the viewport-end to set the viewport duration width. Discrete mode will show "preview wings" which will extend slightly beyond the start and end of your actual viewport-start and viewport-end dates. The user can navigate the timeline via paging arrows, which may be disabled if the timeline does not have a full viewport worth of time data to display. To get the best usage, the timeline start and end should be set with a small buffer before and after their actual values (e.g. Dec 15, 2012 - Jan 15, 2014) The viewport-start and viewport-end should be carefully configured to start and end within the time period of usage. The timeline will pick the closest axis label when navigating through with the navigation arrows. Note: discrete mode is only supported in redwood. In vertical timeline orientation, the viewport navigation mode uses continuous behavior.
Default Value:
  • "continuous"
Since:
  • 11.1.0
Names
Item Name
Property viewportNavigationMode
Property change event viewportNavigationModeChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-viewport-navigation-mode-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, see Events and Listeners for additional information.) 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
itemIndex number
seriesIndex number

Events

ojMove

Triggered after events are moved to a different location within the timeline via drag and drop or equivalent keyboard actions (See Keyboard End User Information). See also the dnd.move attribute.
Properties:

All of the event payloads listed below can be found under event.detail. See Events and Listeners for additional information.

Name Type Description
end string The end value of the event, if the source event were to move to the target position. See Date and Time Formats for more details on the ISO string format.
itemContexts Array<{itemType: string, data: ojTimeline.SeriesItem<K>, seriesData: ojTimeline.Series<K>, itemData: D | null, color: string}> An array of dataContexts of the moved event. The first dataContext of the array corresponds to the source event where the move was initiated (e.g. the event directly under the mouse when drag started).
Properties
Name Type Description
color string The color of the source event.
data ojTimeline.SeriesItem<K> The data object of the source event.
itemData D The data provider data object for the source event. This will only be set if a DataProvider is being used.
seriesData ojTimeline.Series<K> The data for the series the source event belongs to.
start string The start value of the event, if the source event were to move to the target position. See Date and Time Formats for more details on the ISO string format.
value string The value at the target position the source event is moved to. See Date and Time Formats for more details on the ISO string format.

ojResize

Triggered after events are resized. See also the dnd.resize attribute.
Properties:

All of the event payloads listed below can be found under event.detail. See Events and Listeners for additional information.

Name Type Description
end string The end value of the event (always chronologically after, or equivalent to, the start value), if the resize happened. See Date and Time Formats for more details on the ISO string format.
itemContexts Array<{itemType: string, data: ojTimeline.SeriesItem<K>, seriesData: ojTimeline.Series<K>, itemData: D | null, color: string}> An array of dataContexts of the resized events. The first dataContext of the array corresponds to the source event where the resize was initiated (e.g. the event directly under the mouse when drag started).
Properties
Name Type Description
color string The color of the source event.
data ojTimeline.SeriesItem<K> The data object of the source event.
itemData D The data provider row data object for the source event. This will only be set if a DataProvider is being used.
seriesData ojTimeline.Series<K> The data for the row the source event belongs to.
start string The start value of the event (always chronologically before, or equivalent to, the end value), if the resize happened. See Date and Time Formats for more details on the ISO string format.
typeDetail string The type of resize, either 'start' or 'end'.
value string The value at the target position. See Date and Time Formats for more details on the ISO string format.

ojViewportChange

Triggered after the viewport is changed due to a zoom or scroll operation. If the viewport changes the minor-axis scale into a custom timescale instance of DvtTimeComponentScale, then the minorAxisScale will be the "name" field value of the instance.
Properties:

All of the event payloads listed below can be found under event.detail. See Events and Listeners for additional information.

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

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<K=any,D=any>

Object type that defines a timeline data item for the no template case.
Properties:
Name Type Argument Default Description
background "blue" | "orange" | "purple" | "red" | "teal" | "green" <optional>
The background color of the item bubble. If the item is of type "duration-event", then a color stripe will also be rendered in the item bubble. The exact background and stripe color values come from the CSS and vary based on theme. For each item, there is an accessibility requirement for use cases where a color difference is used to convey information. The application is responsible for making sure that the information conveyed is also available in visible text.
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.
itemType "event" | "duration-bar" | "duration-event" | "auto" <optional>
"auto" The item type for the bubble. If not specified, defaults to auto behavior (event item-type if end date not specified, duration-bar if end date specified).
seriesId string The id for the row the task belongs to.
shortDesc ?(string | ((context: ojTimeline.ItemShortDescContext<K,D>) => 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 ?Partial<CSSStyleDeclaration> <optional>
The CSS style defining any additional styling of the item. If not specified, no additional styling will be applied. Only SVG CSS style properties are supported.
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.
title string <optional>
The title text displayed on the timeline item. If not specified, no title will be shown.

itemBubbleTemplateContext<K, D>

Properties:
Name Type Description
contentWidth number | null The available width in pixels for content inside the duration-event bubble, or null if the item is not a duration-event. See also maxAvailableWidth.
data oj.ojTimeline.SeriesItem.<K> The data object of the item.
durationWidth number | null width of the duration-event bubble or null if not duration-event.
Deprecated:
Since Description
13.1.0 The durationWidth property is deprecated. Please use the contentWidth property instead.
itemData D The data provider row data object for the item. This will only be set if an DataProvider for data is being used.
maxAvailableWidth number The maximum available width in pixels for content. This value generally maps to the available space inside the item bubble, or in the case of duration-event items, accounts for space inside and outside the item bubble. This value also accounts for a theme-driven max width and overflow breakpoint.
previousState Object An object that reflects the previous state of the item.
Properties
Name Type Description
focused boolean True if the item was previously focused.
hovered boolean True if the item was previously hovered.
selected boolean True if the item was previously selected.
seriesData oj.ojTimeline.Series.<K> The data for the series the item belongs to.
state Object An object that reflects the current state of the item.
Properties
Name Type Description
focused boolean True if the item is currently focused.
hovered boolean True if the item is currently hovered.
selected boolean True if the item is currently selected.

ItemShortDescContext<K, D>

Properties:
Name Type Description
data oj.ojTimeline.SeriesItem.<K> The data object of the hovered item.
itemData D The data provider row data object for the hovered item. This will only be set if an DataProvider for data is being used.
seriesData oj.ojTimeline.Series.<K> The data for the series the hovered item belongs to.

ItemTemplateContext

Properties:
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 current item
key any The key of the current item

NodeContext

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

ReferenceObject

Properties:
Name Type Argument Description
label string <optional>
The label value of this reference object. If not specified, no reference object label will be shown.
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
emptyText string <optional>
The text of an empty timeline series.
id string The identifier for the 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.
items Array.<oj.ojTimeline.SeriesItem.<K>> <optional>
An array of items. If not specified, no data will be shown in this series.
label string <optional>
"" The label displayed on the timeline series. In not specified, no label will be shown.
svgStyle ?Partial<CSSStyleDeclaration> <optional>
{} The CSS style object defining any additional styling of the series. If not specified, no additional styling will be applied. Only SVG CSS style properties are supported.

SeriesItem<K,D=any>

Properties:
Name Type Argument Default Description
background "blue" | "orange" | "purple" | "red" | "teal" | "green" <optional>
The background color of the item bubble. If the item is of type "duration-event", then a color stripe will also be rendered in the item bubble. The exact background and stripe color values come from the CSS and vary based on theme. For each item, there is an accessibility requirement for use cases where a color difference is used to convey information. The application is responsible for making sure that the information conveyed is also available in visible text.
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.
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.
itemType "event" | "duration-bar" | "duration-event" | "auto" <optional>
"auto" The item type for the bubble. If not specified, defaults to auto behavior (event item-type if end date not specified, duration-bar if end date specified).
shortDesc ?(string | ((context: ojTimeline.ItemShortDescContext<K,D>) => 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 ?Partial<CSSStyleDeclaration> <optional>
The CSS style defining any additional styling of the item. If not specified, no additional styling will be applied. Only SVG CSS style properties are supported.
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.
title string <optional>
The title text displayed on the timeline item. If not specified, no title will be shown.

SeriesTemplateContext

Properties:
Name Type Description
componentElement Element The <oj-timeline> custom element
id any The series id
index number The series index
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

TooltipContext<K, D>

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