Element: <oj-gantt>

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:
  • 2.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 Gantt

Description:

A JET Gantt is a themable, WAI-ARIA compliant element that illustrates the start and finish dates of tasks.

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


<oj-gantt
  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"}'
  rows='{{data}}'>
</oj-gantt>

Accessibility

The application is responsible for populating the shortDesc value in the component properties 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 Gantt 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
Task Tap Select when selection-mode is enabled.
Press & Hold Display tooltip.
Display context menu on release.
Chart Area Drag Paning: navigate forward and backward in time in horizontal/vertical orientation.
Pinch-close Zoom Out.
Spread-open Zoom In.
Zoom Control Tap on "+" element Zoom In.
Tap on "-" element Zoom Out.

Keyboard End User Information

Key Action
Tab Move focus to next element.
Shift + Tab Move focus to previous element.
= or + Zoom in one level.
- or _ Zoom out one level.
PageUp or PageDown Pan up / down.
Shift + PageUp or PageDown Pan left/right (RTL: Pan right/left).
LeftArrow When focus is on a task, move focus and selection to the task on the left within the same row. In LTR reading direction, if this is the first task within the row, then move focus and selection to the last task in the previous row. In RTL reading direction, if this is the last task within the row, then move focus and selection to the first task in the next row.
When focus is on a dependency line (see Alt + < and Alt + >), move focus to the predecessor task (RTL: successor task).
RightArrow When focus is on a task, move focus and selection to the task on the right within the same row. In LTR reading direction, if this is the last task within the row, then move focus and selection to the first task in the next row. In RTL reading direction, if this is the first task within the row, then move focus and selection to the last task in the previous row.
When focus is on a dependency line (see Alt + < and Alt + >), move focus to the successor task (RTL: predecessor task).
UpArrow When focus is on a task, move focus and selection to first task in the previous row.
When focus is on a dependency line (see Alt + < and Alt + >), move focus to the previous dependency line with the same predecessor/successor.
DownArrow When focus is on a task, move focus and selection to first task in the next row.
When focus is on a dependency line (see Alt + < and Alt + >), move focus to the next dependency line with the same predecessor/successor.
Ctrl + Space Multi-select task with focus.
Shift + <task navigation shortcut> Move focus and multi-select a task.
Ctrl + <task navigation shortcut> Move focus to a task but do not select.
Alt + < Move focus from a task to an associated dependency line connecting to a predecessor task (RTL: successor task). Note that the dependency line must have been created referencing the task's ID in its predecessor/successorTask objects for an association to exist. Also note that when focus is on a dependency line, the UpArrow and DownArrow keys are used to move focus to the next dependency line with the same predecessor/successor.
Alt + > Move focus from a task to an associated dependency line connecting to a successor task (RTL: predecessor task). Note that the dependency line must have been created referencing the task's ID in its predecessor/successorTask objects for an association to exist. Also note that when focus is on a dependency line, the UpArrow and DownArrow keys are used to move focus to the next dependency line with the same predecessor/successor.
Ctrl + Mousewheel Up Zoom In.
Ctrl + Mousewheel Down Zoom Out.

Performance

Animation

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

Data Set Size

Gantt has been tested to render up to 5000 tasks in 1 second. In general, applications should avoid displaying a very large number of task bars at the same time. Applications could for example use a filter to only show task bars for a specific set of time ranges.

Gantt Span

It's recommended that applications limit the number of time intervals that are rendered by the Gantt chart. For example, a Gantt chart 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 element (scrolling and zooming) regardless of the number of task bars present.

Tracking Resize

By default, the element will track resizes and render at the new size. This functionality adds a small overhead to the initial render for simple elements like gauges or spark charts, which become noticable when using large numbers of these simple elements. To disable resize tracking, set trackResize to off. The application can manually request a re-render at any time by calling the refresh function.

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

axis-position :string

The position of the major and minor axis.
Supported Values:
Name Type
"bottom" string
"top" string
Default Value:
  • "top"
Names
Item Name
Property axisPosition
Property change event axisPositionChanged
Property change listener attribute (must be of type function) on-axis-position-changed

dependencies :Array.<object>|Promise

An array of objects that defines dependencies between tasks. Also accepts a Promise that will resolve with an array for deferred data rendering. No data will be rendered if the Promise is rejected.
Default Value:
  • null
Names
Item Name
Property dependencies
Property change event dependenciesChanged
Property change listener attribute (must be of type function) on-dependencies-changed

dependencies[].id :string

The identifier for the dependency line. This must be unique across all dependency lines in Gantt.
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.

dependencies[].predecessorTaskId :string

The identifier for the predecessor task. This must reference a task in Gantt.
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.

dependencies[].shortDesc :string

The description of the dependency line. This is used for accessibility.
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.

dependencies[].successorTaskId :string

The identifier for the successor task. This must reference a task in Gantt.
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.

dependencies[].svgClassName :string

A space delimited list of class name set on the dependency line.
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.

dependencies[].svgStyle :object

The CSS style defining the style of the dependency line.
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.

dependencies[].type :string

The type of dependency. The following values are supported:
  • finishStart: predecessor task must finish before successor task can start.
  • finishFinish: predecessor task must finish before successor task can finish.
  • startStart: predecessor task must start before successor task can start.
  • startFinish: predecessor task must start before successor task can finish.
Supported Values:
Name Type
"finishFinish" string
"finishStart" string
"startFinish" string
"startStart" string
Default Value:
  • "finishStart"
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.

end :string

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

gridlines :object

An object specifying whether to display or hide the horizontal and vertical grid lines.
Default Value:
  • null
Names
Item Name
Property gridlines
Property change event gridlinesChanged
Property change listener attribute (must be of type function) on-gridlines-changed

gridlines.horizontal :string

Horizontal gridlines. The default value is "auto", which means Gantt will decide whether the grid lines should be made visible or hidden.
Supported Values:
Name Type
"auto" string
"hidden" string
"visible" string
Default Value:
  • "auto"
Names
Item Name
Property gridlines.horizontal

gridlines.vertical :string

Vertical gridlines. The default value is "auto", which means Gantt will decide whether the grid lines should be made visible or hidden.
Supported Values:
Name Type
"auto" string
"hidden" string
"visible" string
Default Value:
  • "auto"
Names
Item Name
Property gridlines.vertical

major-axis :object

An object with the following properties, used to define the major time axis. If not specified, no major time axis is shown.
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.
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.zoom-order :Array.<string>

An array of strings containing the names of scales used for zooming from longest to shortest. If not specified, the 'scale' specified on the axis will be used at all zoom levels.
Default Value:
  • null
Names
Item Name
Property majorAxis.zoomOrder

minor-axis :object

An object with the following properties, used to define the minor time axis. This is required in order for the Gantt 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 Gantt 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.zoom-order :Array.<string>

An array of strings containing the names of scales used for zooming from longest to shortest. If not specified, the 'scale' specified on the axis will be used at all zoom levels.
Default Value:
  • null
Names
Item Name
Property minorAxis.zoomOrder

reference-objects :Array.<object>

The array of reference objects associated with the gantt. 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[].svgClassName :string

A space delimited list of CSS style classes defining the style of the reference object. Note that only CSS style applicable to SVG elements can be used.
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.

referenceObjects[].svgStyle :object

The CSS style defining the style of the reference object.
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.

referenceObjects[].value :string

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 string formats.
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.

row-axis :object

An object defining properties for the row labels region.
Default Value:
  • null
Names
Item Name
Property rowAxis
Property change event rowAxisChanged
Property change listener attribute (must be of type function) on-row-axis-changed

row-axis.max-width :string

Defines the maximum width of the region in pixels (e.g. '50px') or percent (e.g. '15%') of the element width. If 'none' is specified, then the width has no maximum value. Labels will truncate to fit.
Default Value:
  • null
Names
Item Name
Property rowAxis.maxWidth

row-axis.rendered :string

Defines whether row labels are rendered.
Supported Values:
Name Type
"off" string
"on" string
Default Value:
  • "off"
Names
Item Name
Property rowAxis.rendered

rows :Array.<object>|Promise

An array of objects with the following properties, used to define rows and tasks within rows. Also accepts a Promise that will resolve with an array for deferred data rendering. No data will be rendered if the Promise is rejected.
Default Value:
  • null
Names
Item Name
Property rows
Property change event rowsChanged
Property change listener attribute (must be of type function) on-rows-changed

rows[].id :string

The identifier for the row. Optional if the row contains only one task. This must be unique across all rows in Gantt.
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.

rows[].label :string

The label associated with the row.
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.

rows[].labelStyle :object

The CSS style defining the style of the label. Only CSS style applicable to SVG elements can be used.
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.

rows[].tasks :Array.<object>

An array of objects with the following properties, used to define a task. If not specified, no data will be shown. When only one of 'start' or 'end' value is specified, or when 'start' and 'end' values are equal, the task is considered a milestone task.
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.

rows[].tasks[].baseline :object

Specifies the baseline of the task. When only one of 'start' or 'end' value is specified, or when 'start' and 'end' values are equal, the baseline is considered a milestone baseline.
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.

rows[].tasks[].baseline.borderRadius :string

The border radius of the baseline. Accepts values allowed in CSS border-radius attribute.
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.

rows[].tasks[].baseline.end :string

The end time of the baseline. Optional if baseline is a milestone. Either start or end has to be defined in order for the baseline to properly render. See Date and Time Formats for more details on string formats.
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.

rows[].tasks[].baseline.height :number

The height of the baseline in pixel.
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.

rows[].tasks[].baseline.start :string

The start time of the baseline. Optional if baseline is a milestone. Either start or end has to be defined in order for the baseline to properly render. See Date and Time Formats for more details on string formats.
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.

rows[].tasks[].baseline.svgClassName :string

A space delimited list of CSS style classes defining the style of the baseline.
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.

rows[].tasks[].baseline.svgStyle :object

The CSS style defining the style of the baseline.
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.

rows[].tasks[].borderRadius :string

The border radius of the task. Accepts values allowed in CSS border-radius attribute.
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.

rows[].tasks[].end :string

The end time of this task. Optional if task is a single date event like Milestone. Either start or end has to be defined in order for the task to properly render. See Date and Time Formats for more details on string formats.
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.

rows[].tasks[].height :number

The height of the task in pixel.
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.

rows[].tasks[].id :string

The identifier for the task. This must be unique across all tasks in the Gantt, and is required in order for the Gantt 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.

rows[].tasks[].label :string

The label associated with the task.
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.

rows[].tasks[].labelPosition :string|Array.<string>

The position of the label relative to the task. An array of values is also supported. If an array is specified, then the values are traversed until a position that can fully display the label is found. If 'max' is specified in the array, then of all the positions evaluated up to that point of the traversal, the one with the largest space is used (label is truncated to fit). Naturally, 'max' is ignored if it's specified as the first value of the array. If the last value of the array is reached, but the label cannot be fully displayed, then the label is placed at that position, truncated to fit. Due to space constraints in the milestone and task with progress cases, the inner positions will exhibit the following behaviors:
  • For milestones, specifying 'innerStart', 'innerEnd', or 'innerCenter' would be equivalent to specifying 'start', 'end', and 'end' respectively.
  • For tasks with progress, 'innerCenter' means the label will be aligned to the end of the progress bar, either placed inside or outside of the progress, whichever is the larger space. 'innerStart' and 'innerEnd' positions are honored when there is enough space to show the label at those positions. Otherwise, the aforementioned 'innerCenter' behavior is exhibited.
Supported Values:
Name Type
"end" string
"innerCenter" string
"innerEnd" string
"innerStart" string
"none" string
"start" string
Default Value:
  • ["end", "innerCenter", "start", "max"]
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.

rows[].tasks[].labelStyle :object

The CSS style defining the style of the label. Only CSS style applicable to SVG elements can be used.
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.

rows[].tasks[].progress :object

Specifies the progress of the task. This property is ignored if the task is a milestone.
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.

rows[].tasks[].progress.borderRadius :string

The border radius of the progress bar. Accepts values allowed in CSS border-radius attribute.
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.

rows[].tasks[].progress.height :string

Specifies the height of the progress bar in pixels (e.g. '50px') or percent of the associated task bar (e.g. '15%').
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.

rows[].tasks[].progress.svgClassName :string

A space delimited list of CSS style classes to apply to the progress bar. Note that only CSS style applicable to SVG elements can be used.
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.

rows[].tasks[].progress.svgStyle :object

The CSS inline style to apply to the progress bar. Only CSS style applicable to SVG elements can be used.
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.

rows[].tasks[].progress.value :number

The value of the progress between 0 and 1 inclusive. If not specified or invalid, no progress 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.

rows[].tasks[].shortDesc :string

The description of the task. This is used for accessibility and for customizing the tooltip text.
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.

rows[].tasks[].start :string

The start time of this task. Optional if task is a single date event like Milestone. Either start or end has to be defined in order for the task to properly render. See Date and Time Formats for more details on string formats.
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.

rows[].tasks[].svgClassName :string

A space delimited list of CSS style classes defining the style of the task.
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.

rows[].tasks[].svgStyle :object

The CSS style defining the style of the task.
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 tasks.
Default Value:
  • null
Supports writeback:
  • true
Names
Item Name
Property selection
Property change event selectionChanged
Property change listener attribute (must be of type function) on-selection-changed

selection-mode :string

The type of selection behavior that is enabled on the Gantt. If 'single' is specified, only a single task can be selected at once. If 'multiple', any number of tasks 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

start :string

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

task-defaults :object

An object with the following properties, used to define default styling for tasks in the Gantt.
Default Value:
  • null
Names
Item Name
Property taskDefaults
Property change event taskDefaultsChanged
Property change listener attribute (must be of type function) on-task-defaults-changed

task-defaults.baseline :object

An object with the following properties, used to define default styling for task baseline elements.
Default Value:
  • null
Names
Item Name
Property taskDefaults.baseline

task-defaults.baseline.border-radius :string

The border radius of the baseline. Accepts values allowed in CSS border-radius attribute.
Default Value:
  • null
Names
Item Name
Property taskDefaults.baseline.borderRadius

task-defaults.baseline.height :number

The height of the baseline in pixel.
Default Value:
  • null
Names
Item Name
Property taskDefaults.baseline.height

task-defaults.baseline.svg-class-name :string

A space delimited list of CSS style classes defining the style of the baseline.
Default Value:
  • null
Names
Item Name
Property taskDefaults.baseline.svgClassName

task-defaults.baseline.svg-style :object

The CSS style defining the style of the baseline.
Default Value:
  • null
Names
Item Name
Property taskDefaults.baseline.svgStyle

task-defaults.border-radius :string

The border radius of the task. Accepts values allowed in CSS border-radius attribute.
Default Value:
  • null
Names
Item Name
Property taskDefaults.borderRadius

task-defaults.height :number

The height of the task in pixel.
Default Value:
  • null
Names
Item Name
Property taskDefaults.height

task-defaults.label-position :string|Array.<string>

The position of the label relative to the task. An array of values is also supported. If an array is specified, then the values are traversed until a position that can fully display the label is found. If 'max' is specified in the array, then of all the positions evaluated up to that point of the traversal, the one with the largest space is used (label is truncated to fit). Naturally, 'max' is ignored if it's specified as the first value of the array. If the last value of the array is reached, but the label cannot be fully displayed, then the label is placed at that position, truncated to fit. Due to space constraints in the milestone and task with progress cases, the inner positions will exhibit the following behaviors:
  • For milestones, specifying 'innerStart', 'innerEnd', or 'innerCenter' would be equivalent to specifying 'start', 'end', and 'end' respectively.
  • For tasks with progress, 'innerCenter' means the label will be aligned to the end of the progress bar, either placed inside or outside of the progress, whichever is the larger space. 'innerStart' and 'innerEnd' positions are honored when there is enough space to show the label at those positions. Otherwise, the aforementioned 'innerCenter' behavior is exhibited.
Supported Values:
Name Type
"end" string
"innerCenter" string
"innerEnd" string
"innerStart" string
"none" string
"start" string
Default Value:
  • ["end", "innerCenter", "start", "max"]
Names
Item Name
Property taskDefaults.labelPosition

task-defaults.progress :object

An object with the following properties, used to define default styling for progress bars on non-milestone tasks.
Default Value:
  • null
Names
Item Name
Property taskDefaults.progress

task-defaults.progress.border-radius :string

The border radius of the progress bar. Accepts values allowed in CSS border-radius attribute.
Default Value:
  • null
Names
Item Name
Property taskDefaults.progress.borderRadius

task-defaults.progress.height :string

Specifies the height of the progress bar in pixels (e.g. '50px') or percent of the associated task bar (e.g. '15%').
Default Value:
  • null
Names
Item Name
Property taskDefaults.progress.height

task-defaults.progress.svg-class-name :string

A space delimited list of CSS style classes to apply to the progress bar. Note that only CSS style applicable to SVG elements can be used.
Default Value:
  • null
Names
Item Name
Property taskDefaults.progress.svgClassName

task-defaults.progress.svg-style :object

The CSS inline style to apply to the progress bar. Only CSS style applicable to SVG elements can be used.
Default Value:
  • null
Names
Item Name
Property taskDefaults.progress.svgStyle

task-defaults.svg-class-name :string

A space delimited list of CSS style classes defining the style of the task.
Default Value:
  • null
Names
Item Name
Property taskDefaults.svgClassName

task-defaults.svg-style :object

The CSS style defining the style of the task.
Default Value:
  • null
Names
Item Name
Property taskDefaults.svgStyle

tooltip :object

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

tooltip.renderer :function(object)

A function that returns a custom tooltip. The function takes a dataContext argument, provided by the gantt, with the following properties:
  • parentElement: The tooltip element. This can be used to change the tooltip border or background color.
  • data: The data object of the hovered task.
  • rowData: The data for the row the hovered task belongs to.
  • componentElement: The gantt element.
  • color: The color of the hovered task.
The function should return an Object that contains only one of the two properties:
  • insert: HTMLElement | string - An HTML element, which will be appended to the tooltip, or a tooltip string.
  • preventDefault: true - Indicates that the tooltip should not be displayed. It is not necessary to return {preventDefault:false} to display tooltip, since this is a default behavior.
Default Value:
  • null
Names
Item Name
Property tooltip.renderer

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-dependency-info :string

Provides properties to customize the screen reader text describing a specific dependency.

See the translations property for usage examples.

Default Value:
  • "Dependency type {0}, connects {1} to {2}"
Since:
  • 2.3.0
Names
Item Name
Property translations.accessibleDependencyInfo

translations.accessible-predecessor-info :string

Provides properties to customize the screen reader text describing predecessors of a task.

See the translations property for usage examples.

Default Value:
  • "{0} predecessors"
Since:
  • 2.3.0
Names
Item Name
Property translations.accessiblePredecessorInfo

translations.accessible-successor-info :string

Provides properties to customize the screen reader text describing successors of a task.

See the translations property for usage examples.

Default Value:
  • "{0} successors"
Since:
  • 2.3.0
Names
Item Name
Property translations.accessibleSuccessorInfo

translations.component-name :string

Used to describe the data visualization type for accessibility.

See the translations property for usage examples.

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

translations.finish-finish-dependency-aria-desc :string

Used to describe finish to finish dependency type for accessibility.

See the translations property for usage examples.

Default Value:
  • "finish to finish"
Since:
  • 2.3.0
Names
Item Name
Property translations.finishFinishDependencyAriaDesc

translations.finish-start-dependency-aria-desc :string

Used to describe finish to start dependency type for accessibility.

See the translations property for usage examples.

Default Value:
  • "finish to start"
Since:
  • 2.3.0
Names
Item Name
Property translations.finishStartDependencyAriaDesc

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-baseline-date :string

Used for the default tooltip label for baseline milestone information.

See the translations property for usage examples.

Default Value:
  • "Baseline Date"
Since:
  • 4.0.0
Names
Item Name
Property translations.labelBaselineDate

translations.label-baseline-end :string

Used for the default tooltip label for baseline end time information.

See the translations property for usage examples.

Default Value:
  • "Baseline End"
Since:
  • 4.0.0
Names
Item Name
Property translations.labelBaselineEnd

translations.label-baseline-start :string

Used for the default tooltip label for baseline start time information.

See the translations property for usage examples.

Default Value:
  • "Baseline Start"
Since:
  • 4.0.0
Names
Item Name
Property translations.labelBaselineStart

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-date :string

Used for the default tooltip label for milestone information.

See the translations property for usage examples.

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

translations.label-end :string

Used for the default tooltip label for end time information.

See the translations property for usage examples.

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

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-label :string

Used for the default tooltip label for task label information.

See the translations property for usage examples.

Default Value:
  • "Label"
Since:
  • 2.3.0
Names
Item Name
Property translations.labelLabel

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-progress :string

Used for the default tooltip label for task progress information.

See the translations property for usage examples.

Default Value:
  • "Progress"
Since:
  • 4.0.0
Names
Item Name
Property translations.labelProgress

translations.label-row :string

Used for the default tooltip label for row information.

See the translations property for usage examples.

Default Value:
  • "Row"
Since:
  • 2.3.0
Names
Item Name
Property translations.labelRow

translations.label-start :string

Used for the default tooltip label for start time information.

See the translations property for usage examples.

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

translations.start-finish-dependency-aria-desc :string

Used to describe start to finish dependency type for accessibility.

See the translations property for usage examples.

Default Value:
  • "start to finish"
Since:
  • 2.3.0
Names
Item Name
Property translations.startFinishDependencyAriaDesc

translations.start-start-dependency-aria-desc :string

Used to describe start to start dependency type for accessibility.

See the translations property for usage examples.

Default Value:
  • "start to start"
Since:
  • 2.3.0
Names
Item Name
Property translations.startStartDependencyAriaDesc

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 property 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 property 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 task properties.
Default Value:
  • null
Names
Item Name
Property valueFormats
Property change event valueFormatsChanged
Property change listener attribute (must be of type function) on-value-formats-changed

value-formats.baseline-date :object

Specifies tooltip behavior for the date value of the milestone baseline.
Default Value:
  • null
Names
Item Name
Property valueFormats.baselineDate

value-formats.baseline-date.converter :object

The converter (an object literal or instance that duck types oj.Converter) used to format the label. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property valueFormats.baselineDate.converter

value-formats.baseline-date.tooltip-display :string

Whether the value is displayed in the tooltip.
Supported Values:
Name Type
"auto" string
"off" string
Default Value:
  • "auto"
Names
Item Name
Property valueFormats.baselineDate.tooltipDisplay

value-formats.baseline-date.tooltip-label :string

A string representing the label that is displayed before the value in the tooltip.
Default Value:
  • null
Names
Item Name
Property valueFormats.baselineDate.tooltipLabel

value-formats.baseline-end :object

Specifies tooltip behavior for the end value of the baseline.
Default Value:
  • null
Names
Item Name
Property valueFormats.baselineEnd

value-formats.baseline-end.converter :object

The converter (an object literal or instance that duck types oj.Converter) used to format the label. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property valueFormats.baselineEnd.converter

value-formats.baseline-end.tooltip-display :string

Whether the value is displayed in the tooltip.
Supported Values:
Name Type
"auto" string
"off" string
Default Value:
  • "auto"
Names
Item Name
Property valueFormats.baselineEnd.tooltipDisplay

value-formats.baseline-end.tooltip-label :string

A string representing the label that is displayed before the value in the tooltip.
Default Value:
  • null
Names
Item Name
Property valueFormats.baselineEnd.tooltipLabel

value-formats.baseline-start :object

Specifies tooltip behavior for the start value of the baseline.
Default Value:
  • null
Names
Item Name
Property valueFormats.baselineStart

value-formats.baseline-start.converter :object

The converter (an object literal or instance that duck types oj.Converter) used to format the label. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property valueFormats.baselineStart.converter

value-formats.baseline-start.tooltip-display :string

Whether the value is displayed in the tooltip.
Supported Values:
Name Type
"auto" string
"off" string
Default Value:
  • "auto"
Names
Item Name
Property valueFormats.baselineStart.tooltipDisplay

value-formats.baseline-start.tooltip-label :string

A string representing the label that is displayed before the value in the tooltip.
Default Value:
  • null
Names
Item Name
Property valueFormats.baselineStart.tooltipLabel

value-formats.date :object

Specifies tooltip behavior for the date value of a milestone task.
Default Value:
  • null
Names
Item Name
Property valueFormats.date

value-formats.date.converter :object

The converter (an object literal or instance that duck types oj.Converter) used to format the label. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property valueFormats.date.converter

value-formats.date.tooltip-display :string

Whether the value is displayed in the tooltip.
Supported Values:
Name Type
"auto" string
"off" string
Default Value:
  • "auto"
Names
Item Name
Property valueFormats.date.tooltipDisplay

value-formats.date.tooltip-label :string

A string representing the label that is displayed before the value in the tooltip.
Default Value:
  • null
Names
Item Name
Property valueFormats.date.tooltipLabel

value-formats.end :object

Specifies tooltip behavior for the end value.
Default Value:
  • null
Names
Item Name
Property valueFormats.end

value-formats.end.converter :object

The converter (an object literal or instance that duck types oj.Converter) used to format the label. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property valueFormats.end.converter

value-formats.end.tooltip-display :string

Whether the value is displayed in the tooltip.
Supported Values:
Name Type
"auto" string
"off" string
Default Value:
  • "auto"
Names
Item Name
Property valueFormats.end.tooltipDisplay

value-formats.end.tooltip-label :string

A string representing the label that is displayed before the value in the tooltip.
Default Value:
  • null
Names
Item Name
Property valueFormats.end.tooltipLabel

value-formats.label :object

Specifies tooltip behavior for the label value.
Default Value:
  • null
Names
Item Name
Property valueFormats.label

value-formats.label.tooltip-display :string

Whether the value is displayed in the tooltip.
Supported Values:
Name Type
"auto" string
"off" string
Default Value:
  • "auto"
Names
Item Name
Property valueFormats.label.tooltipDisplay

value-formats.label.tooltip-label :string

A string representing the label that is displayed before the value in the tooltip.
Default Value:
  • null
Names
Item Name
Property valueFormats.label.tooltipLabel

value-formats.progress :object

Specifies tooltip behavior for the progress value.
Default Value:
  • null
Names
Item Name
Property valueFormats.progress

value-formats.progress.converter :object

The converter (an object literal or instance that duck types oj.Converter) used to format the label. See oj.NumberConverterFactory for details on creating built-in number converters.
Default Value:
  • null
Names
Item Name
Property valueFormats.progress.converter

value-formats.progress.tooltip-display :string

Whether the value is displayed in the tooltip.
Supported Values:
Name Type
"auto" string
"off" string
Default Value:
  • "auto"
Names
Item Name
Property valueFormats.progress.tooltipDisplay

value-formats.progress.tooltip-label :string

A string representing the label that is displayed before the value in the tooltip.
Default Value:
  • null
Names
Item Name
Property valueFormats.progress.tooltipLabel

value-formats.row :object

Specifies tooltip behavior for the row value.
Default Value:
  • null
Names
Item Name
Property valueFormats.row

value-formats.row.tooltip-display :string

Whether the value is displayed in the tooltip.
Supported Values:
Name Type
"auto" string
"off" string
Default Value:
  • "auto"
Names
Item Name
Property valueFormats.row.tooltipDisplay

value-formats.row.tooltip-label :string

A string representing the label that is displayed before the value in the tooltip.
Default Value:
  • null
Names
Item Name
Property valueFormats.row.tooltipLabel

value-formats.start :object

Specifies tooltip behavior for the start value.
Default Value:
  • null
Names
Item Name
Property valueFormats.start

value-formats.start.converter :object

The converter (an object literal or instance that duck types oj.Converter) used to format the label. See oj.DateTimeConverterFactory for details on creating built-in datetime converters.
Default Value:
  • null
Names
Item Name
Property valueFormats.start.converter

value-formats.start.tooltip-display :string

Whether the value is displayed in the tooltip.
Supported Values:
Name Type
"auto" string
"off" string
Default Value:
  • "auto"
Names
Item Name
Property valueFormats.start.tooltipDisplay

value-formats.start.tooltip-label :string

A string representing the label that is displayed before the value in the tooltip.
Default Value:
  • null
Names
Item Name
Property valueFormats.start.tooltipLabel

viewport-end :string

The end time of the Gantt'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 Gantt. See Date and Time Formats for more details on string formats.
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 Gantt'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 Gantt. See Date and Time Formats for more details on string formats.
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-gantt-row-label

Context for Gantt row label at a specified index.

Properties:
Name Type
index number

oj-gantt-taskbar

Context for Gantt task at a specified index.

Properties:
Name Type
rowIndex number
index 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 gantt chart
viewportEnd string the end of the new viewport on a gantt chart
majorAxisScale string the time scale of the majorAxis
minorAxisScale string the time scale of the minorAxis
Examples

Specify an ojViewportChange listener via the DOM attribute:

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

Specify an ojViewportChange listener via the JavaScript property:

myGantt.onOjViewportChange = listener;

Add an ojViewportChange listener via the addEventListener API:

myGantt.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");