Element: <oj-timeline>

Oracle® JavaScript Extension Toolkit (JET)
4.2.0

E91398-01

QuickNav

Attributes


Context Objects

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

Version:
  • 4.2.0
Since:
  • 1.1.0

JET Custom Elements

JET components are implemented as custom HTML elements. A detailed description of working with these elements can be found in: JET Custom Element 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.
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 elements can have up to two types of child content:

  • Any child element with a slot attribute will be moved into that named slot, e.g. <span slot='startIcon'>...</span>. All supported named slots are documented below. Child elements with unsupported named slots will be removed from the DOM.
  • Any child element lacking a slot attribute will be moved to the default slot, also known as a regular child.

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 and demos 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.

Example

Initialize the component with a context menu:

<oj-some-element>
    <-- use the contextMenu slot to designate this as the context menu for this component -->
    <oj-menu slot="contextMenu" style="display:none" aria-label="Some element's context menu">
...
    </oj-menu>
</oj-some-element>

Attributes

animation-on-data-change :string

Defines the animation that is applied on data changes.
Supported Values:
Name Type
"auto" string
"none" string
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 :string

Defines the animation that is shown on initial display.
Supported Values:
Name Type
"auto" string
"none" string
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

end :string

The end time of the timeline. This is required in order for the timeline to properly render.
Default Value:
  • null
Names
Item Name
Property end
Property change event endChanged
Property change listener attribute (must be of type function) on-end-changed

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.
Default Value:
  • null
Names
Item Name
Property majorAxis
Property change event majorAxisChanged
Property change listener attribute (must be of type function) on-major-axis-changed

major-axis.converter :object

The converter (an object literal or instance that duck types oj.Converter) used to format the labels of the major axis. If not specified, the default converter is used. If a single converter is specified, it will be used for all 'scale' values. Otherwise, an object whose keys are 'scale' values that map to the converter instances is expected. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property majorAxis.converter

major-axis.converter.days :object

The converter (an object literal or instance that duck types oj.Converter) used for the 'days' scale. If not specified, the default converter will be used for this scale. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property majorAxis.converter.days

major-axis.converter.default :object

The default converter (an object literal or instance that duck types oj.Converter) to use for all 'scale' values that do not otherwise have a converter object provided. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property majorAxis.converter.default

major-axis.converter.hours :object

The converter (an object literal or instance that duck types oj.Converter) used for the 'hours' scale. If not specified, the default converter will be used for this scale. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property majorAxis.converter.hours

major-axis.converter.minutes :object

The converter (an object literal or instance that duck types oj.Converter) used for the 'minutes' scale. If not specified, the default converter will be used for this scale. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property majorAxis.converter.minutes

major-axis.converter.months :object

The converter (an object literal or instance that duck types oj.Converter) used for the 'months' scale. If not specified, the default converter will be used for this scale. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property majorAxis.converter.months

major-axis.converter.quarters :object

The converter (an object literal or instance that duck types oj.Converter) used for the 'quarters' scale. If not specified, the default converter will be used for this scale. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property majorAxis.converter.quarters

major-axis.converter.seconds :object

The converter (an object literal or instance that duck types oj.Converter) used for the 'seconds' scale. If not specified, the default converter will be used for this scale. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property majorAxis.converter.seconds

major-axis.converter.weeks :object

The converter (an object literal or instance that duck types oj.Converter) used for the 'weeks' scale. If not specified, the default converter will be used for this scale. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property majorAxis.converter.weeks

major-axis.converter.years :object

The converter (an object literal or instance that duck types oj.Converter) used for the 'years' scale. If not specified, the default converter will be used for this scale. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property majorAxis.converter.years

major-axis.scale :string

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.
Supported Values:
Name Type
"days" string
"hours" string
"minutes" string
"months" string
"quarters" string
"seconds" string
"weeks" string
"years" string
Default Value:
  • null
Names
Item Name
Property majorAxis.scale

major-axis.svg-style :object

The CSS style defining any additional styling of the axis. If not specified, no additional styling will be applied.
Default Value:
  • null
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.
Default Value:
  • null
Names
Item Name
Property minorAxis
Property change event minorAxisChanged
Property change listener attribute (must be of type function) on-minor-axis-changed

minor-axis.converter :object

The converter (an object literal or instance that duck types oj.Converter) used to format the labels of the minor axis. If not specified, the default converter is used. If a single converter is specified, it will be used for all 'scale' values. Otherwise, an object whose keys are 'scale' values that map to the converter instances is expected. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property minorAxis.converter

minor-axis.converter.days :object

The converter (an object literal or instance that duck types oj.Converter) used for the 'days' scale. If not specified, the default converter will be used for this scale. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property minorAxis.converter.days

minor-axis.converter.default :object

The default converter (an object literal or instance that duck types oj.Converter) to use for all 'scale' values that do not otherwise have a converter object provided. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property minorAxis.converter.default

minor-axis.converter.hours :object

The converter (an object literal or instance that duck types oj.Converter) used for the 'hours' scale. If not specified, the default converter will be used for this scale. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property minorAxis.converter.hours

minor-axis.converter.minutes :object

The converter (an object literal or instance that duck types oj.Converter) used for the 'minutes' scale. If not specified, the default converter will be used for this scale. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property minorAxis.converter.minutes

minor-axis.converter.months :object

The converter (an object literal or instance that duck types oj.Converter) used for the 'months' scale. If not specified, the default converter will be used for this scale. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property minorAxis.converter.months

minor-axis.converter.quarters :object

The converter (an object literal or instance that duck types oj.Converter) used for the 'quarters' scale. If not specified, the default converter will be used for this scale. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property minorAxis.converter.quarters

minor-axis.converter.seconds :object

The converter (an object literal or instance that duck types oj.Converter) used for the 'seconds' scale. If not specified, the default converter will be used for this scale. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property minorAxis.converter.seconds

minor-axis.converter.weeks :object

The converter (an object literal or instance that duck types oj.Converter) used for the 'weeks' scale. If not specified, the default converter will be used for this scale. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property minorAxis.converter.weeks

minor-axis.converter.years :object

The converter (an object literal or instance that duck types oj.Converter) used for the 'years' scale. If not specified, the default converter will be used for this scale. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property minorAxis.converter.years

minor-axis.scale :string

The time scale used for the minor axis. This is required in order for the timeline to properly render.
Supported Values:
Name Type
"days" string
"hours" string
"minutes" string
"months" string
"quarters" string
"seconds" string
"weeks" string
"years" string
Default Value:
  • null
Names
Item Name
Property minorAxis.scale

minor-axis.svg-style :object

The CSS style defining any additional styling of the axis. If not specified, no additional styling will be applied.
Default Value:
  • null
Names
Item Name
Property minorAxis.svgStyle

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 minor axis will be used at all zoom levels.
Default Value:
  • null
Names
Item Name
Property minorAxis.zoomOrder

orientation :string

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

overview :object

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

overview.rendered :string

Specifies whether the overview scrollbar is rendered.
Supported Values:
Name Type
"off" string
"on" string
Default Value:
  • "off"
Names
Item Name
Property overview.rendered

overview.svg-style :object

The CSS style defining any additional styling of the overview. If not specified, no additional styling will be applied.
Default Value:
  • null
Names
Item Name
Property overview.svgStyle

reference-objects :Array.<object>

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:
  • null
Names
Item Name
Property referenceObjects
Property change event referenceObjectsChanged
Property change listener attribute (must be of type function) on-reference-objects-changed

referenceObjects[].value :string

The value of this reference object. If not specified, no reference object will be shown.
Default Value:
  • null
Note: This property is a subproperty of an array-valued property. Such properties cannot be set individually either at init time via HTML attribute syntax or at runtime via JavaScript. Instead, the outermost array-valued attribute, and its ancestor attributes, can be set at init time or runtime.

selection :Array.<string>

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

selection-mode :string

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:
Name Type
"multiple" string
"none" string
"single" string
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

series :Array.<object>|Promise

An array of objects with the following properties, used to define a timeline series. Also accepts a Promise or callback function for deferred data rendering. The function should return one of the following:
  • Promise: A Promise that will resolve with an array of data items. No data will be rendered if the Promise is rejected.
  • Array: An array of data items.
Default Value:
  • null
Names
Item Name
Property series
Property change event seriesChanged
Property change listener attribute (must be of type function) on-series-changed

series[].emptyText :string

The text of an empty timeline series.
Default Value:
  • null
Note: This property is a subproperty of an array-valued property. Such properties cannot be set individually either at init time via HTML attribute syntax or at runtime via JavaScript. Instead, the outermost array-valued attribute, and its ancestor attributes, can be set at init time or runtime.

series[].id :string

The identifier for the timeline series.
Default Value:
  • null
Note: This property is a subproperty of an array-valued property. Such properties cannot be set individually either at init time via HTML attribute syntax or at runtime via JavaScript. Instead, the outermost array-valued attribute, and its ancestor attributes, can be set at init time or runtime.

series[].itemLayout :string

The direction in which items are laid out when in a horizontal orientation. This attribute is ignored when in a vertical orientation.
Supported Values:
Name Type
"auto" string
"bottomToTop" string
"topToBottom" string
Default Value:
  • "auto"
Note: This property is a subproperty of an array-valued property. Such properties cannot be set individually either at init time via HTML attribute syntax or at runtime via JavaScript. Instead, the outermost array-valued attribute, and its ancestor attributes, can be set at init time or runtime.

series[].items :Array.<object>

An array of objects with the following properties, used to define a timeline item. If not specified, no data will be shown in this series.
Default Value:
  • null
Note: This property is a subproperty of an array-valued property. Such properties cannot be set individually either at init time via HTML attribute syntax or at runtime via JavaScript. Instead, the outermost array-valued attribute, and its ancestor attributes, can be set at init time or runtime.

series[].items[].description :string

The description text displayed on the timeline item. If not specified, no description will be shown.
Default Value:
  • null
Note: This property is a subproperty of an array-valued property. Such properties cannot be set individually either at init time via HTML attribute syntax or at runtime via JavaScript. Instead, the outermost array-valued attribute, and its ancestor attributes, can be set at init time or runtime.

series[].items[].durationFillColor :string

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.
Default Value:
  • null
Note: This property is a subproperty of an array-valued property. Such properties cannot be set individually either at init time via HTML attribute syntax or at runtime via JavaScript. Instead, the outermost array-valued attribute, and its ancestor attributes, can be set at init time or runtime.

series[].items[].end :string

The end time of this timeline item. If not specified, no duration bar will be shown.
Default Value:
  • null
Note: This property is a subproperty of an array-valued property. Such properties cannot be set individually either at init time via HTML attribute syntax or at runtime via JavaScript. Instead, the outermost array-valued attribute, and its ancestor attributes, can be set at init time or runtime.

series[].items[].id :string

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.
Default Value:
  • null
Note: This property is a subproperty of an array-valued property. Such properties cannot be set individually either at init time via HTML attribute syntax or at runtime via JavaScript. Instead, the outermost array-valued attribute, and its ancestor attributes, can be set at init time or runtime.

series[].items[].start :string

The start time of this timeline item. This is required in order for the timeline item to properly render.
Default Value:
  • null
Note: This property is a subproperty of an array-valued property. Such properties cannot be set individually either at init time via HTML attribute syntax or at runtime via JavaScript. Instead, the outermost array-valued attribute, and its ancestor attributes, can be set at init time or runtime.

series[].items[].svgStyle :object

The CSS style defining any additional styling of the item. If not specified, no additional styling will be applied.
Default Value:
  • null
Note: This property is a subproperty of an array-valued property. Such properties cannot be set individually either at init time via HTML attribute syntax or at runtime via JavaScript. Instead, the outermost array-valued attribute, and its ancestor attributes, can be set at init time or runtime.

series[].items[].thumbnail :string

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.
Default Value:
  • null
Note: This property is a subproperty of an array-valued property. Such properties cannot be set individually either at init time via HTML attribute syntax or at runtime via JavaScript. Instead, the outermost array-valued attribute, and its ancestor attributes, can be set at init time or runtime.

series[].items[].title :string

The title text displayed on the timeline item. If not specified, no title will be shown.
Default Value:
  • null
Note: This property is a subproperty of an array-valued property. Such properties cannot be set individually either at init time via HTML attribute syntax or at runtime via JavaScript. Instead, the outermost array-valued attribute, and its ancestor attributes, can be set at init time or runtime.

series[].label :string

The label displayed on the timeline series. In not specified, no label will be shown.
Default Value:
  • null
Note: This property is a subproperty of an array-valued property. Such properties cannot be set individually either at init time via HTML attribute syntax or at runtime via JavaScript. Instead, the outermost array-valued attribute, and its ancestor attributes, can be set at init time or runtime.

series[].svgStyle :object

The CSS style defining any additional styling of the series. If not specified, no additional styling will be applied.
Default Value:
  • null
Note: This property is a subproperty of an array-valued property. Such properties cannot be set individually either at init time via HTML attribute syntax or at runtime via JavaScript. Instead, the outermost array-valued attribute, and its ancestor attributes, can be set at init time or runtime.

start :string

The start time of the timeline. This is required in order for the timeline to properly render.
Default Value:
  • null
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.
Default Value:
  • null
Names
Item Name
Property styleDefaults
Property change event styleDefaultsChanged
Property change listener attribute (must be of type function) on-style-defaults-changed

style-defaults.animation-duration :number

The duration of the animations, in milliseconds. Also accepts CSS strings such as 1s and 1000ms. 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.
Default Value:
  • null
Names
Item Name
Property styleDefaults.animationDuration

style-defaults.border-color :string

The border color of the timeline.
Default Value:
  • null
Names
Item Name
Property styleDefaults.borderColor

style-defaults.item :object

An object with the following properties, used to define the default styling for the timeline item.
Default Value:
  • null
Names
Item Name
Property styleDefaults.item

style-defaults.item.background-color :string

The background color of the timeline items.
Default Value:
  • null
Names
Item Name
Property styleDefaults.item.backgroundColor

style-defaults.item.border-color :string

The border color of the timeline items.
Default Value:
  • null
Names
Item Name
Property styleDefaults.item.borderColor

style-defaults.item.description-style :object

The CSS style defining the style of the timeline item description text.
Default Value:
  • null
Names
Item Name
Property styleDefaults.item.descriptionStyle

style-defaults.item.hover-background-color :string

The background color of the highlighted timeline items.
Default Value:
  • null
Names
Item Name
Property styleDefaults.item.hoverBackgroundColor

style-defaults.item.hover-border-color :string

The border color of the highlighted timeline items.
Default Value:
  • null
Names
Item Name
Property styleDefaults.item.hoverBorderColor

style-defaults.item.selected-background-color :string

The background color of the selected timeline items.
Default Value:
  • null
Names
Item Name
Property styleDefaults.item.selectedBackgroundColor

style-defaults.item.selected-border-color :string

The border color of the selected timeline items.
Default Value:
  • null
Names
Item Name
Property styleDefaults.item.selectedBorderColor

style-defaults.item.title-style :object

The CSS style defining the style of the timeline item title text.
Default Value:
  • null
Names
Item Name
Property styleDefaults.item.titleStyle

style-defaults.major-axis :object

An object with the following properties, used to define the default styling for the major time axis.
Default Value:
  • null
Names
Item Name
Property styleDefaults.majorAxis

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

The CSS style defining the style of the major time axis label text.
Default Value:
  • null
Names
Item Name
Property styleDefaults.majorAxis.labelStyle

style-defaults.major-axis.separator-color :string

The color of the major time axis separators.
Default Value:
  • null
Names
Item Name
Property styleDefaults.majorAxis.separatorColor

style-defaults.minor-axis :object

An object with the following properties, used to define the default styling for the time axis.
Default Value:
  • null
Names
Item Name
Property styleDefaults.minorAxis

style-defaults.minor-axis.background-color :string

The background color of the time axis.
Default Value:
  • null
Names
Item Name
Property styleDefaults.minorAxis.backgroundColor

style-defaults.minor-axis.border-color :string

The border color of the time axis.
Default Value:
  • null
Names
Item Name
Property styleDefaults.minorAxis.borderColor

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

The CSS style defining the style of the time axis label text.
Default Value:
  • null
Names
Item Name
Property styleDefaults.minorAxis.labelStyle

style-defaults.minor-axis.separator-color :string

The color of the time axis separators.
Default Value:
  • null
Names
Item Name
Property styleDefaults.minorAxis.separatorColor

style-defaults.overview :object

An object with the following properties, used to define the default styling for the timeline overview.
Default Value:
  • null
Names
Item Name
Property styleDefaults.overview

style-defaults.overview.background-color :string

The background color of the timeline overview.
Default Value:
  • null
Names
Item Name
Property styleDefaults.overview.backgroundColor

style-defaults.overview.label-style :object

The CSS style defining the style of the timeline overview label text.
Default Value:
  • null
Names
Item Name
Property styleDefaults.overview.labelStyle

style-defaults.overview.window :object

An object with the following properties, used to define the default styling for the timeline overview window.
Default Value:
  • null
Names
Item Name
Property styleDefaults.overview.window

style-defaults.overview.window.background-color :string

The background color of the timeline overview window.
Default Value:
  • null
Names
Item Name
Property styleDefaults.overview.window.backgroundColor

style-defaults.overview.window.border-color :string

The border color of the timeline overview window.
Default Value:
  • null
Names
Item Name
Property styleDefaults.overview.window.borderColor

style-defaults.reference-object :object

An object with the following properties, used to define the default styling for the reference objects.
Default Value:
  • null
Names
Item Name
Property styleDefaults.referenceObject

style-defaults.reference-object.color :string

The color of the reference objects.
Default Value:
  • null
Names
Item Name
Property styleDefaults.referenceObject.color

style-defaults.series :object

An object with the following properties, used to define the default styling for the timeline series.
Default Value:
  • null
Names
Item Name
Property styleDefaults.series

style-defaults.series.background-color :string

The background color of the series.
Default Value:
  • null
Names
Item Name
Property styleDefaults.series.backgroundColor

style-defaults.series.colors :Array.<string>

The array defining the default color ramp for the series items.
Default Value:
  • null
Names
Item Name
Property styleDefaults.series.colors

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

The CSS style defining the style of the series empty text.
Default Value:
  • null
Names
Item Name
Property styleDefaults.series.emptyTextStyle

style-defaults.series.label-style :object

The CSS style defining the style of the series label text.
Default Value:
  • null
Names
Item Name
Property styleDefaults.series.labelStyle

track-resize :string

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:
Name Type
"off" string
"on" string
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
Examples

Initialize the data visualization element with the track-resize attribute specified:

<oj-some-dvt track-resize='off'></oj-some-dvt>

Get or set the trackResize property after initialization:

// getter
var value = myComponent.trackResize;

// setter
myComponent.trackResize="off";

translations :Object

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 this component has translations, their documentation immediately follows this doc entry.

Default Value:
  • an object containing all resources relevant to the component, or null if none
Names
Item Name
Property translations
Property change event translationsChanged
Property change listener attribute (must be of type function) on-translations-changed
Examples

Initialize the component, overriding some translated resources and leaving the others intact:

<!-- Using dot notation -->
<oj-some-element translations.some-key='some value' translations.some-other-key='some other value'></oj-some-element>

<!-- Using JSON notation -->
<oj-some-element translations='{"someKey":"some value", "someOtherKey":"some other value"}'></oj-some-element>

Get or set the translations property after initialization:

// Get one
var value = myComponent.translations.someKey;

// Set one, leaving the others intact. Always use the setProperty API for 
// subproperties rather than setting a subproperty directly.
myComponent.setProperty('translations.someKey', 'some value');

// Get all
var values = myComponent.translations;

// Set all.  Must list every resource key, as those not listed are lost.
myComponent.translations = {
    someKey: 'some value',
    someOtherKey: 'some other value'
};

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

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

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

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

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

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

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

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

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

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

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

translations.label-series :string

Used for accessibility.

See the translations attribute for usage examples.

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

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

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

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

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

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

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

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

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

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

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

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

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

viewport-end :string

The end time of the timeline's viewport. If not specified, this will default to a value determined by the initial 'scale' of the minor axis and the width of the timeline.
Default Value:
  • null
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, this will default to a value determined by the initial 'scale' of the minor axis and the width of the timeline.
Default Value:
  • null
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
Examples

Specify an ojViewportChange listener via the DOM attribute:

<oj-timeline on-oj-viewport-change='[[listener]]'></oj-timeline>

Specify an ojViewportChange listener via the JavaScript property:

myTimeline.onOjViewportChange = listener;

Add an ojViewportChange listener via the addEventListener API:

myTimeline.addEventListener('ojViewportChange', listener);

Methods

getContextByNode(node) → {Object|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 Description
node Element The child DOM node
Returns:
The context for the DOM node, or null when none is found.
Type
Object | null
Example
 // Returns {'subId': 'oj-some-sub-id', 'componentSpecificProperty': someValue, ...}
var context = myComponent.getContextByNode(nodeInsideElement);

getProperty(property) → {*}

Retrieves a value for a property or a single subproperty for complex properties.
Parameters:
Name Type Description
property string The property name to get. Supports dot notation for subproperty access.
Returns:
Type
*
Example

Get a single subproperty of a complex property:

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

refresh()

Refreshes the component.

setProperties(properties)

Performs a batch set of properties.
Parameters:
Name Type Description
properties Object An object containing the property and value pairs to set.
Example

Set a batch of properties:

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

setProperty(property, value)

Sets a property or a single subproperty for complex properties and notifies the component of the change, triggering a [property]Changed event.
Parameters:
Name Type Description
property string The property name to set. Supports dot notation for subproperty access.
value * The new value to set the property to.
Example

Set a single subproperty of a complex property:

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