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
slotattribute 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
slotattribute will be moved to the default slot, also known as a regular child.
-
contextMenu
-
The contextMenu slot is set on the
oj-menuwithin 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-duration :number
-
Specifies the animation duration in milliseconds. 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. The default value comes from the CSS and varies based on theme.
Names
Item Name Property animationDurationProperty change event animationDurationChangedProperty change listener attribute (must be of type function) on-animation-duration-changed -
animation-on-data-change :string
-
Specifies the animation that is applied on data changes.
- Default Value:
"none"
Supported Values:
Name Type "auto"string "none"string Names
Item Name Property animationOnDataChangeProperty change event animationOnDataChangeChangedProperty change listener attribute (must be of type function) on-animation-on-data-change-changed -
animation-on-display :string
-
Specifies the animation that is shown on initial display.
- Default Value:
"none"
Supported Values:
Name Type "auto"string "none"string Names
Item Name Property animationOnDisplayProperty change event animationOnDisplayChangedProperty change listener attribute (must be of type function) on-animation-on-display-changed -
animation-update-color :string
-
The color that is displayed during a data change animation when a node is updated.
- Default Value:
""
Names
Item Name Property animationUpdateColorProperty change event animationUpdateColorChangedProperty change listener attribute (must be of type function) on-animation-update-color-changed -
color-label :string
-
Specifies the label describing the color metric of the sunburst. This label will be used in the legend.
- Default Value:
""
Names
Item Name Property colorLabelProperty change event colorLabelChangedProperty change listener attribute (must be of type function) on-color-label-changed -
display-levels :number
-
The number of levels of nodes to display. By default all nodes are displayed.
- Default Value:
Number.MAX_VALUE
Names
Item Name Property displayLevelsProperty change event displayLevelsChangedProperty change listener attribute (must be of type function) on-display-levels-changed -
drilling :string
-
Specifies whether drilling is enabled. Drillable nodes will show a pointer cursor on hover and fire an
ojBeforeDrillandojDrillevent on click (double click if selection is enabled). Drilling on a node causes a property change to the rootNode attribute. The displayLevels attribute can be used in conjunction with drilling to display very deep hieracrchies. Use "on" to enable drilling for all nodes. To enable or disable drilling on individual nodes use the drilling attribute in each node.- Default Value:
"off"
Supported Values:
Name Type "off"string "on"string Names
Item Name Property drillingProperty change event drillingChangedProperty change listener attribute (must be of type function) on-drilling-changed -
expanded :KeySet
-
Specifies the key set containing the ids of sunburst nodes that should be expanded on initial render. Use the ExpandedKeySet class to specify nodes to expand. Use the ExpandAllKeySet class to expand all nodes. By default, all sunburst nodes are expanded.
- Default Value:
new ExpandAllKeySet()
- Supports writeback:
true
Names
Item Name Property expandedProperty change event expandedChangedProperty change listener attribute (must be of type function) on-expanded-changed -
hidden-categories :Array.<string>
-
An array of category strings used for filtering. Nodes with any category matching an item in this array will be filtered.
- Default Value:
[]
- Supports writeback:
true
Names
Item Name Property hiddenCategoriesProperty change event hiddenCategoriesChangedProperty change listener attribute (must be of type function) on-hidden-categories-changed -
highlight-match :string
-
The matching condition for the highlightedCategories property. By default, highlightMatch is 'all' and only items whose categories match all of the values specified in the highlightedCategories array will be highlighted. If highlightMatch is 'any', then items that match at least one of the highlightedCategories values will be highlighted.
- Default Value:
"all"
Supported Values:
Name Type "all"string "any"string Names
Item Name Property highlightMatchProperty change event highlightMatchChangedProperty change listener attribute (must be of type function) on-highlight-match-changed -
highlighted-categories :Array.<string>
-
An array of category strings used for highlighting. Nodes matching all categories in this array will be highlighted.
- Default Value:
[]
- Supports writeback:
true
Names
Item Name Property highlightedCategoriesProperty change event highlightedCategoriesChangedProperty change listener attribute (must be of type function) on-highlighted-categories-changed -
hover-behavior :string
-
Defines the behavior applied when hovering over the nodes.
- Default Value:
"none"
Supported Values:
Name Type "dim"string "none"string Names
Item Name Property hoverBehaviorProperty change event hoverBehaviorChangedProperty change listener attribute (must be of type function) on-hover-behavior-changed -
hover-behavior-delay :number
-
Specifies initial hover delay in ms for highlighting nodes.
- Default Value:
200
Names
Item Name Property hoverBehaviorDelayProperty change event hoverBehaviorDelayChangedProperty change listener attribute (must be of type function) on-hover-behavior-delay-changed -
node-defaults :Object
-
An object defining default properties for the nodes. Component CSS classes should be used to set component wide styling. This API should be used only for styling a specific instance of the component. Properties specified on this object may be overridden by specifications on the sunburst nodes. Some property default values come from the CSS and varies based on theme.
Names
Item Name Property nodeDefaultsProperty change event nodeDefaultsChangedProperty change listener attribute (must be of type function) on-node-defaults-changed -
node-defaults.border-color :string
-
The default border color of the nodes.
Names
Item Name Property nodeDefaults.borderColor -
node-defaults.border-width :number
-
The default border width of the nodes.
- Default Value:
1
Names
Item Name Property nodeDefaults.borderWidth -
node-defaults.hover-color :string
-
The color of the node hover feedback. The default value comes from the CSS and varies based on theme.
Names
Item Name Property nodeDefaults.hoverColor -
node-defaults.label-display :string
-
The label display behavior for the nodes. More labels are generally displayed when using rotation, with the trade off of readability. When auto is used, rotated or horizontal labels will be used based on the client browser and platform.
- Default Value:
"auto"
Supported Values:
Name Type "auto"string "horizontal"string "off"string "rotated"string Names
Item Name Property nodeDefaults.labelDisplay -
node-defaults.label-halign :string
-
The horizontal alignment for labels displayed within the node. Only applies to rotated text.
- Default Value:
"center"
Supported Values:
Name Type "center"string "inner"string "outer"string Names
Item Name Property nodeDefaults.labelHalign -
node-defaults.label-min-length :number
-
The minimum number of visible characters needed in order to render a truncated label. If the minimum is not met when calculating the truncated label then the label is not displayed.
- Default Value:
1
Names
Item Name Property nodeDefaults.labelMinLength -
node-defaults.label-style :Object
-
The CSS style object defining the style of the label. The default value comes from the CSS and varies based on theme.
Names
Item Name Property nodeDefaults.labelStyle -
node-defaults.selected-inner-color :string
-
The inner color of the node selection feedback. The default value comes from the CSS and varies based on theme.
Names
Item Name Property nodeDefaults.selectedInnerColor -
node-defaults.selected-outer-color :string
-
The outer color of the node selection feedback. The default value comes from the CSS and varies based on theme.
Names
Item Name Property nodeDefaults.selectedOuterColor -
node-defaults.show-disclosure :string
-
Specifies whether to display the expand/collapse button on hover. If the button is clicked, the expanded attribute is updated with the new array of node ids.
- Default Value:
"off"
Supported Values:
Name Type "off"string "on"string Names
Item Name Property nodeDefaults.showDisclosure -
nodes :Array.<Object>|Promise|null
-
An array of objects with the following properties that defines the data for the nodes. Also accepts a Promise for deferred data rendering. No data will be rendered if the Promise is rejected.
- Default Value:
null
Names
Item Name Property nodesProperty change event nodesChangedProperty change listener attribute (must be of type function) on-nodes-changed -
nodes[].borderColor :string
-
The border color of the node.
- 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. -
nodes[].borderWidth :number
-
The border width of the node.
- 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. -
nodes[].categories :Array.<string>
-
An optional array of category strings corresponding to this data item. This enables highlighting and filtering of individual data items through interactions with the legend and other visualization elements. The categories array of each node is required to be a superset of the categories array of its parent node. If not specified, the ids of the node and its ancestors will 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. -
nodes[].color :string
-
The fill color of the node.
- 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. -
nodes[].drilling :string
-
Specifies whether drilling is enabled for the node. Drillable nodes will show a pointer cursor on hover and fire an
ojDrillevent on click (double click if selection is enabled). To enable drilling for all nodes at once, use the drilling attribute in the top level.- Default Value:
"inherit"
Supported Values:
Name Type "inherit"string "off"string "on"string 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. -
nodes[].id :string
-
The id of the node.
- 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. -
nodes[].label :string
-
The label for this node.
- 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. -
nodes[].labelDisplay :string
-
The label display behavior for the nodes. More labels are generally displayed when using rotation, with the trade off of readability. When auto is used, rotated or horizontal labels will be used based on the client browser and platform.
- Default Value:
"auto"
Supported Values:
Name Type "auto"string "horizontal"string "off"string "rotated"string 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. -
nodes[].labelHalign :string
-
The horizontal alignment for labels displayed within the node. Only applies to rotated text.
- Default Value:
"center"
Supported Values:
Name Type "center"string "inner"string "outer"string 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. -
nodes[].labelStyle :Object
-
The CSS style object defining the style of the label.
- 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. -
nodes[].nodes :Array.<Object>
-
An array of objects with properties for the child nodes.
- 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. -
nodes[].pattern :string
-
The pattern used to fill the node.
- Default Value:
"none"
Supported Values:
Name Type "largeChecker"string "largeCrosshatch"string "largeDiagonalLeft"string "largeDiagonalRight"string "largeDiamond"string "largeTriangle"string "none"string "smallChecker"string "smallCrosshatch"string "smallDiagonalLeft"string "smallDiagonalRight"string "smallDiamond"string "smallTriangle"string 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. -
nodes[].radius :number
-
The radius of the node relative to the other nodes.
- Default Value:
1
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. -
nodes[].selectable :string
-
Specifies whether or not the node will be selectable.
- Default Value:
"auto"
Supported Values:
Name Type "auto"string "off"string 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. -
nodes[].shortDesc :string
-
The description of this node. This is used for accessibility and also 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. -
nodes[].showDisclosure :string
-
Specifies whether to display the expand/collapse button on hover for a specific node. If the button is clicked, the expanded attribute is updated with the new array of node ids.
- Default Value:
"inherit"
Supported Values:
Name Type "inherit"string "off"string "on"string 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. -
nodes[].svgClassName :string
-
The CSS style class to apply to the node. The style class and inline style will override any other styling specified through the properties. For tooltip interactivity, it's recommended to also pass a representative color to the node color 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. -
nodes[].svgStyle :Object
-
The inline style to apply to the node. The style class and inline style will override any other styling specified through the properties. For tooltip interactivity, it's recommended to also pass a representative color to the node color 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. -
nodes[].value :number
-
The relative size of the node.
- 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. -
root-node :string
-
The id of the root node. When specified, only the root node and children of the root will be displayed.
- Default Value:
""
Names
Item Name Property rootNodeProperty change event rootNodeChangedProperty change listener attribute (must be of type function) on-root-node-changed -
root-node-content :Object
-
An object defining custom root node content for the sunburst.
Names
Item Name Property rootNodeContentProperty change event rootNodeContentChangedProperty change listener attribute (must be of type function) on-root-node-content-changed -
root-node-content.renderer :function(Object): (Object|null)
-
A function that returns custom root node content. The function takes a dataContext argument, provided by the sunburst, with the following properties:
- outerBounds: Object containing (x, y, width, height) of the rectangle circumscribing the root node area. The x and y coordinates are relative to the top, left corner of the element.
- innerBounds: Object containing (x, y, width, height) of the rectangle inscribed in the root node area. The x and y coordinates are relative to the top, left corner of the element.
- id: The id of the root node.
- data: The data object of the root node.
- componentElement: The sunburst element.
- insert: HTMLElement - HTML element, which will be overlaid on top of the sunburst. This HTML element will block interactivity of the sunburst by default, but the CSS pointer-events property can be set to 'none' on this element if the sunburst's interactivity is desired.
- Default Value:
null
Names
Item Name Property rootNodeContent.renderer -
rotation :string
-
Specifies whether client side rotation is enabled.
- Default Value:
"on"
Supported Values:
Name Type "off"string "on"string Names
Item Name Property rotationProperty change event rotationChangedProperty change listener attribute (must be of type function) on-rotation-changed -
selection :Array.<string>
-
An array containing the ids of the initially selected nodes.
- Default Value:
[]
- Supports writeback:
true
Names
Item Name Property selectionProperty change event selectionChangedProperty change listener attribute (must be of type function) on-selection-changed -
selection-mode :string
-
Specifies the selection mode.
- Default Value:
"multiple"
Supported Values:
Name Type "multiple"string "none"string "single"string Names
Item Name Property selectionModeProperty change event selectionModeChangedProperty change listener attribute (must be of type function) on-selection-mode-changed -
size-label :string
-
Specifies the label describing the size metric of the sunburst. This label will be used in the legend.
- Default Value:
""
Names
Item Name Property sizeLabelProperty change event sizeLabelChangedProperty change listener attribute (must be of type function) on-size-label-changed -
sorting :string
-
Specifies whether whether the nodes are sorted by size. When sorting is enabled, nodes that have the same parent are sorted in order of descending size.
- Default Value:
"off"
Supported Values:
Name Type "off"string "on"string Names
Item Name Property sortingProperty change event sortingChangedProperty change listener attribute (must be of type function) on-sorting-changed -
start-angle :number
-
Specifies the starting angle of the sunburst. Valid values are numbers between 0 and 360.
- Default Value:
90
- Supports writeback:
true
Names
Item Name Property startAngleProperty change event startAngleChangedProperty change listener attribute (must be of type function) on-start-angle-changed -
tooltip :Object
-
An object containing an optional callback function for tooltip customization.
Names
Item Name Property tooltipProperty change event tooltipChangedProperty change listener attribute (must be of type function) on-tooltip-changed -
tooltip.renderer :function(Object): (Object|null)
-
A function that returns a custom tooltip. The function takes a dataContext argument, provided by the sunburst, with the following properties:
- parentElement: The tooltip element. The function can directly modify or append content to this element.
- id: The id of the hovered node.
- label: The label of the hovered node.
- value: The value of the hovered node.
- radius: The radius of the hovered node.
- color: The color of the hovered node.
- data: The data object of the hovered node.
- componentElement: The sunburst element.
- 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 -
touch-response :string
-
Data visualizations require a press and hold delay before triggering tooltips and rollover effects on mobile devices to avoid interfering with page panning, but these hold delays can make applications seem slower and less responsive. For a better user experience, the application can remove the touch and hold delay when data visualizations are used within a non scrolling container or if there is sufficient space outside of the visualization for panning. If touchResponse is touchStart the element will instantly trigger the touch gesture and consume the page pan events. If touchResponse is auto, the element will behave like touchStart if it determines that it is not rendered within scrolling content and if panning is not available for those elements that support the feature.
- Default Value:
"auto"
Supported Values:
Name Type "auto"string "touchStart"string Names
Item Name Property touchResponseProperty change event touchResponseChangedProperty change listener attribute (must be of type function) on-touch-response-changed -
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 callingrefreshto render the element at the new size.- Default Value:
"on"
Supported Values:
Name Type "off"string "on"string Names
Item Name Property trackResizeProperty change event trackResizeChangedProperty change listener attribute (must be of type function) on-track-resize-changedExamples
Initialize the data visualization element with the
track-resizeattribute specified:<oj-some-dvt track-resize='off'></oj-some-dvt>Get or set the
trackResizeproperty after initialization:// getter var value = myComponent.trackResize; // setter myComponent.trackResize="off"; -
translations :Object|null
-
A collection of translated resources from the translation bundle, or
nullif this component has no resources. Resources may be accessed and overridden individually or collectively, as seen in the examples.If the component does not contain any translatable resource, the default value of this attribute will be
null. If not, an object containing all resources relevant to the component.If this component has translations, their documentation immediately follows this doc entry.
Names
Item Name Property translationsProperty change event translationsChangedProperty change listener attribute (must be of type function) on-translations-changedExamples
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
translationsproperty 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' }; -
(nullable) translations.component-name :string
-
Used to describe the data visualization type for accessibility.
See the translations attribute for usage examples.
- Default Value:
"Sunburst"
Names
Item Name Property translations.componentName -
(nullable) translations.label-and-value :string
-
Used to display a label and its value.
See the translations attribute for usage examples.
- Default Value:
"{0}: {1}"
Names
Item Name Property translations.labelAndValue -
(nullable) translations.label-clear-selection :string
-
Text shown for clearing multiple selection on touch devices.
See the translations attribute for usage examples.
- Default Value:
"Clear Selection"
Names
Item Name Property translations.labelClearSelection -
(nullable) translations.label-color :string
-
Used for the color label.
See the translations attribute for usage examples.
- Default Value:
"Color"
Names
Item Name Property translations.labelColor -
(nullable) translations.label-count-with-total :string
-
Used to display a count out of a total.
See the translations attribute for usage examples.
- Default Value:
"{0} of {1}"
Names
Item Name Property translations.labelCountWithTotal -
(nullable) translations.label-data-visualization :string
-
Label for data visualizations used for accessibility.
See the translations attribute for usage examples.
- Default Value:
"Data Visualization"
Names
Item Name Property translations.labelDataVisualization -
(nullable) translations.label-invalid-data :string
-
Text shown when the component receives invalid data.
See the translations attribute for usage examples.
- Default Value:
"Invalid data"
Names
Item Name Property translations.labelInvalidData -
(nullable) translations.label-no-data :string
-
Text shown when the component receives no data.
See the translations attribute for usage examples.
- Default Value:
"No data to display"
Names
Item Name Property translations.labelNoData -
(nullable) translations.label-size :string
-
Used for the size label.
See the translations attribute for usage examples.
- Default Value:
"Size"
Names
Item Name Property translations.labelSize -
(nullable) translations.state-collapsed :string
-
Used to describe the collapsed state for accessibility.
See the translations attribute for usage examples.
- Default Value:
"Collapsed"
Names
Item Name Property translations.stateCollapsed -
(nullable) translations.state-drillable :string
-
Used to describe a drillable object for accessibility.
See the translations attribute for usage examples.
- Default Value:
"Drillable"
Names
Item Name Property translations.stateDrillable -
(nullable) translations.state-expanded :string
-
Used to describe the expanded state for accessibility.
See the translations attribute for usage examples.
- Default Value:
"Expanded"
Names
Item Name Property translations.stateExpanded -
(nullable) translations.state-hidden :string
-
Used to describe the hidden state for accessibility.
See the translations attribute for usage examples.
- Default Value:
"Hidden"
Names
Item Name Property translations.stateHidden -
(nullable) translations.state-isolated :string
-
Used to describe the isolated state for accessibility.
See the translations attribute for usage examples.
- Default Value:
"Isolated"
Names
Item Name Property translations.stateIsolated -
(nullable) translations.state-maximized :string
-
Used to describe the maximized state for accessibility.
See the translations attribute for usage examples.
- Default Value:
"Maximized"
Names
Item Name Property translations.stateMaximized -
(nullable) translations.state-minimized :string
-
Used to describe the minimized state for accessibility.
See the translations attribute for usage examples.
- Default Value:
"Minimized"
Names
Item Name Property translations.stateMinimized -
(nullable) translations.state-selected :string
-
Used to describe the selected state for accessibility.
See the translations attribute for usage examples.
- Default Value:
"Selected"
Names
Item Name Property translations.stateSelected -
(nullable) translations.state-unselected :string
-
Used to describe the unselected state for accessibility.
See the translations attribute for usage examples.
- Default Value:
"Unselected"
Names
Item Name Property translations.stateUnselected -
(nullable) translations.state-visible :string
-
Used to describe the visible state for accessibility.
See the translations attribute for usage examples.
- Default Value:
"Visible"
Names
Item Name Property translations.stateVisible -
(nullable) translations.tooltip-collapse :string
-
Used for the collapse tooltip.
See the translations attribute for usage examples.
- Default Value:
"Collapse"
Names
Item Name Property translations.tooltipCollapse -
(nullable) translations.tooltip-expand :string
-
Used for the expand tooltip.
See the translations attribute for usage examples.
- Default Value:
"Expand"
Names
Item Name Property translations.tooltipExpand
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-sunburst-node
-
Context for sunburst nodes indexed by their position in the hierarchy.
Properties:
Name Type Description indexPathArray The array of numerical indices for the node.
Events
-
ojBeforeCollapse
-
Triggered immediately before any container node in the sunburst is collapsed. The collapse event can be vetoed if the beforeCollapse callback returns false.
Properties:
All of the event payloads listed below can be found under
event.detail.Name Type Description idstring the id of the node to collapse dataObject the data object of the node to collapse Examples
Specify an
ojBeforeCollapselistener via the DOM attribute:<oj-sunburst on-oj-before-collapse='[[listener]]'></oj-sunburst>Specify an
ojBeforeCollapselistener via the JavaScript property:mySunburst.onOjBeforeCollapse = listener;Add an
ojBeforeCollapselistener via theaddEventListenerAPI:mySunburst.addEventListener('ojBeforeCollapse', listener); -
ojBeforeDrill
-
Triggered immediately before any node in the sunburst is drilled into. The drill event can be vetoed if the beforeDrill callback returns false.
Properties:
All of the event payloads listed below can be found under
event.detail.Name Type Description idstring the id of the drilled node dataObject the data object of the drilled node Examples
Specify an
ojBeforeDrilllistener via the DOM attribute:<oj-sunburst on-oj-before-drill='[[listener]]'></oj-sunburst>Specify an
ojBeforeDrilllistener via the JavaScript property:mySunburst.onOjBeforeDrill = listener;Add an
ojBeforeDrilllistener via theaddEventListenerAPI:mySunburst.addEventListener('ojBeforeDrill', listener); -
ojBeforeExpand
-
Triggered immediately before any node in the sunburst is expanded. The expand event can be vetoed if the beforeExpand callback returns false.
Properties:
All of the event payloads listed below can be found under
event.detail.Name Type Description idstring the id of the node to expand dataObject the data object of the node to expand Examples
Specify an
ojBeforeExpandlistener via the DOM attribute:<oj-sunburst on-oj-before-expand='[[listener]]'></oj-sunburst>Specify an
ojBeforeExpandlistener via the JavaScript property:mySunburst.onOjBeforeExpand = listener;Add an
ojBeforeExpandlistener via theaddEventListenerAPI:mySunburst.addEventListener('ojBeforeExpand', listener); -
ojCollapse
-
Triggered when a node has been collapsed.
Properties:
All of the event payloads listed below can be found under
event.detail.Name Type Description idstring the id of the collapsed node dataObject the data object of the collapsed node Examples
Specify an
ojCollapselistener via the DOM attribute:<oj-sunburst on-oj-collapse='[[listener]]'></oj-sunburst>Specify an
ojCollapselistener via the JavaScript property:mySunburst.onOjCollapse = listener;Add an
ojCollapselistener via theaddEventListenerAPI:mySunburst.addEventListener('ojCollapse', listener); -
ojDrill
-
Triggered during a drill gesture (double click if selection is enabled, single click otherwise).
Properties:
All of the event payloads listed below can be found under
event.detail.Name Type Description idstring the id of the drilled node dataObject the data object of the drilled node Examples
Specify an
ojDrilllistener via the DOM attribute:<oj-sunburst on-oj-drill='[[listener]]'></oj-sunburst>Specify an
ojDrilllistener via the JavaScript property:mySunburst.onOjDrill = listener;Add an
ojDrilllistener via theaddEventListenerAPI:mySunburst.addEventListener('ojDrill', listener); -
ojExpand
-
Triggered when a node has been expanded. The ui object contains one property, "nodeId", which is the id of the node that has been expanded.
Properties:
All of the event payloads listed below can be found under
event.detail.Name Type Description idstring the id of the expanded node dataObject the data object of the expanded node Examples
Specify an
ojExpandlistener via the DOM attribute:<oj-sunburst on-oj-expand='[[listener]]'></oj-sunburst>Specify an
ojExpandlistener via the JavaScript property:mySunburst.onOjExpand = listener;Add an
ojExpandlistener via theaddEventListenerAPI:mySunburst.addEventListener('ojExpand', listener); -
ojRotateInput
-
Triggered during user rotation of the sunburst.
Properties:
All of the event payloads listed below can be found under
event.detail.Name Type Description valuenumber the start angle of the sunburst, in degrees Examples
Specify an
ojRotateInputlistener via the DOM attribute:<oj-sunburst on-oj-rotate-input='[[listener]]'></oj-sunburst>Specify an
ojRotateInputlistener via the JavaScript property:mySunburst.onOjRotateInput = listener;Add an
ojRotateInputlistener via theaddEventListenerAPI:mySunburst.addEventListener('ojRotateInput', 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 Argument Description nodeElement <not nullable>
The child DOM node Returns:
The context for the DOM node, ornullwhen none is found.- Type
- Object | null
Example
// Returns {'subId': 'oj-some-sub-id', 'componentSpecificProperty': someValue, ...} var context = myComponent.getContextByNode(nodeInsideElement); -
getNode(subIdPath) → {Object|null}
-
Returns an object with the following properties for automation testing verification of the node with the specified subid path.
Parameters:
Name Type Description subIdPathArray The array of indices in the subId for the desired node Properties:
Name Type colorstring labelstring selectedboolean sizenumber tooltipstring Returns:
An object containing properties for the node, or null if none exists.- Type
- Object | null
-
getProperty(property) → {any}
-
Retrieves a value for a property or a single subproperty for complex properties.
Parameters:
Name Type Description propertystring The property name to get. Supports dot notation for subproperty access. - Since:
- 4.0.0
Returns:
- Type
- any
Example
Get a single subproperty of a complex property:
var subpropValue = myComponent.getProperty('complexProperty.subProperty1.subProperty2'); -
refresh() → {void}
-
Refreshes the component.
Returns:
- Type
- void
-
setProperties(properties) → {void}
-
Performs a batch set of properties.
Parameters:
Name Type Description propertiesObject An object containing the property and value pairs to set. - Since:
- 4.0.0
Returns:
- Type
- void
Example
Set a batch of properties:
myComponent.setProperties({"prop1": "value1", "prop2.subprop": "value2", "prop3": "value3"}); -
setProperty(property, value) → {void}
-
Sets a property or a single subproperty for complex properties and notifies the component of the change, triggering a [property]Changed event.
Parameters:
Name Type Description propertystring The property name to set. Supports dot notation for subproperty access. valueany The new value to set the property to. - Since:
- 4.0.0
Returns:
- Type
- void
Example
Set a single subproperty of a complex property:
myComponent.setProperty('complexProperty.subProperty1.subProperty2', "someValue");