Oracle Fusion Middleware Data Visualization Tools Tag Reference for Oracle ADF Faces
12c (12.2.1)

E52773-01

<dvt:treemap>

dvt:treemap treemap treemap

UIComponent class: oracle.adf.view.faces.bi.component.treemap.UITreemap
Component type: oracle.dss.adf.treemap.Treemap

Overview

Treemaps are used to display hierarchical data across two dimensions, represented by the size and color of the treemap nodes. The treemap is best used to emphasize leaf node data, as color information for group nodes is not displayed. To view data across multiple levels of the hierarchy at once, consider using a sunburst instead.

Treemap Nodes

The most common child tag of the treemap is the treemapNode. This tag is stamped for each row of the tree model, and defines the size and color of each node in the component. To vary the stamp, an af:switcher can be used. If multiple stamps are defined, the first rendered stamp is used.

Layouts

The treemap supports several different layouts, which are useful for different situations. The default layout makes the treemap nodes as square as possible, making it easier to compare the size of different nodes. The slice and dice layouts display the nodes in a predefined order, allowing context to be preserved between data updates.

Animations

Multiple types of animations are supported. Use the animationOnDisplay attribute to control the initial animation and the animationOnDataChange attribute to control subsequent animations. For treemap, animationOnDataChange="auto" is recommended.

Attribute Groups

The treemapNode supports attributeGroups for color and pattern customization. Use of attribute groups is recommended, as they provide the information necessary to create a legend.

Legend

The treemap legend displays the data dimensions for the size and color of the nodes, as well as color and pattern information from the attribute groups. Use the sizeLabel and colorLabel attributes to specify the size and color dimensions.

Drilling and Isolate

Drill replace allows a user to change the root node of the component. Use the drilling attribute on the treemapNode to enable drilling

Isolate allows a user to maximize a group node within the component. Use the isolate attribute on the treemapNodeHeader to enable isolate

Note: Drilling is recommended when there are additional layers of data that can be displayed. Unlike isolate, it is a server side operation that will fetch additional data from the tree model.

Advanced Node Content

A limited set of ADF components can be displayed within the treemap nodes. See the node content facet on treemapNode for more details.

Popups and Context Menus

Popups and context menus can be displayed using af:showPopupBehavior, which is a supported child of dvt:treemapNode.

Drag and Drop

Drag and drop is supported using the af:dragSource and af:dropTarget child tags. The payload of the treemap's af:dragSource is a RowKeySet.

Events

Type Phases Description
org.apache.myfaces.trinidad.event.AttributeChangeEvent Invoke Application,
Apply Request Values
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change event might include the width of a column that supported client-side resizing.

Supported Facets

Name Description
bodyContextMenu Deprecated. Context menus can be enabled by adding af:showPopupBehavior to the dvt:treemapNode or dvt:sunburstNode.
contextMenu Deprecated. Context menus can be enabled by adding af:showPopupBehavior to the dvt:treemapNode or dvt:sunburstNode.
multiSelectContextMenu Deprecated. Context menus can be enabled by adding af:showPopupBehavior to the dvt:treemapNode or dvt:sunburstNode.

Attributes

Name Type Supports EL? Description
animationDuration int Yes Default Value: 500

Specifies the animation duration in milliseconds. The default value is 500. 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.
animationOnDataChange String Yes Valid Values: none, activeData, auto, alphaFade, cubeToLeft, cubeToRight, slideToLeft, slideToRight, transitionToLeft, transitionToRight, zoom
Default Value: activeData

Specifies the type of animation to apply on data change. Valid values for animating data objects are:
  • none - Does not apply data change animation effects
  • activeData - (Default) Applies animation for Active Data Service (ADS) data change events.
  • auto - Applies animation for Partial Page Refresh and ADS events.
Animation can also be performed on the entire component, allowing for effects such as slideshow transitions. These animations will be performed on any Partial Page Refresh event, and valid values are:
  • alphaFade
  • cubeToLeft
  • cubeToRight
  • slideToLeft
  • slideToRight
  • transitionToLeft
  • transitionToRight
  • zoom
animationOnDisplay String Yes Valid Values: none, alphaFade, zoom
Default Value: none

Specifies the type of animation to apply when the component is initially displayed. Valid values are:
  • none - (Default) Does not apply any initial rendering effect
  • alphaFade
  • zoom
attributeChangeListener javax.el.MethodExpression Only EL a method reference to an attribute change listener. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing.
binding oracle.adf.view.faces.bi.component.treemap.UITreemap Only EL

Specifies a binding reference to store a specific instance of UITreemap from a backing bean. Set this attribute only to access code in a backing bean. For example, to reference a treemap component in the sample managed bean, use the following code: binding="#{sample.treemap}"

colorLabel String Yes Specifies the label describing the color metric of the component. This label will be used in the legend.
contentDelivery String Yes Valid Values: whenAvailable, lazy, immediate
Default Value: whenAvailable

Specifies whether to fetch content with page load or after page load.
displayLevelsChildren int Yes Default Value: 2

The number of child levels to display during initial render. This property is 0-based. A value of 0 means that no child levels below the root will be shown; the root itself will be shown. The default value is 2, which means that the root and the first two levels of children will be shown.
dontPersist String[] Yes List of persistent attributes that are restricted from persisting to a registered "Persistent Change Manager". Persistent attributes would still persist to a session.
drillListener javax.el.MethodExpression Only EL a method reference to a drill listener, the method is invoked when a drill replace is performed.
emptyText String Yes The text of the component when empty.
groupGaps String Yes Valid Values: all, outer, none
Default Value: outer

Specifies whether gaps are displayed between groups. Valid values are:

  • outer - (default) Gaps are displayed between the outer group nodes.
  • all - Gaps are displayed between all group nodes.
  • none - No gaps are displayed between nodes.
id String No Specifies the identifier for the component
inlineStyle String Yes Style of the outer element (enclosing div) of the component
isolateRowKey Object Yes Specifies the row key of the currently isolated node, if any.
layout String Yes Valid Values: squarified, sliceAndDiceHorizontal, sliceAndDiceVertical
Default Value: squarified

Specifies the layout of the hierarchy. Valid values are:

  • squarified - (default) Nodes are laid out to be as square as possible. This layout is best for understanding the relative size of the nodes.
  • sliceAndDiceHorizontal - Nodes are first laid out horizontally across the width of the treemap, then vertically across the height of the treemap. This layout is good for animation, since the relative ordering of nodes will remain constant.
  • sliceAndDiceVertical - Nodes are first laid out vertically across the height of the treemap, then horizontally across the width of the treemap. This layout is good for animation, since the relative ordering of nodes will remain constant.
legendSource String Yes Specifies the id of the UIAttributeGroups used for display in the legend. This UIAttributeGroups component must be a child of a node within this component.
nodeSelection String Yes Valid Values: none, single, multiple
Default Value: multiple

Specifies the selection mode. Valid values are:

  • "none" - no nodes can be selected
  • "single" - a single node can be selected
  • "multiple" - (default) multiple nodes can be selected
otherColor String Yes A reference to a method that takes the RowKeySet of all nodes contained within the current "Other" node and returns a String for the color of the "Other" node.
otherPattern String Yes A reference to a method that takes the RowKeySet of all nodes contained within the current "Other" node and returns a String for the pattern of the "Other" node.
otherThreshold Number Yes Default Value: 0

Specifies the percentage of the parent/root under which a node would be aggregated into an "Other" node. Valid values range from 0 (default) to 1. For example, a value of 0.1 would cause all nodes which are less than 10% of their parent/root to be aggregated into the "Other" node.
otherThresholdBasis String Yes Valid Values: parentPercentage, rootPercentage
Default Value: parentPercentage

Specifies the basis used to apply the otherThreshold value as either a percentage of the root node or of the parent node. Valid values are:
  • parentPercentage - (Default) Nodes are compared against their parent's size when applying otherThreshold
  • rootPercentage - Nodes are compared against the size of the root when applying otherThreshold
partialTriggers String[] Yes The IDs of the components that should trigger a partial update. This component will listen on the trigger components. If one of the trigger components receives an event that will cause it to update in some way, this component will request to be updated too.
persist String[] Yes List of persistent attributes that are persisting to a registered "Persistent Change Manager". Persistent attributes, by default, always persist to a session.
rendered boolean Yes Default Value: true

Specifies whether the component is rendered.
rootRowKey Object Yes Specifies the row key of the root of the component, if different than the root of the model.
selectedRowKeys org.apache.myfaces.trinidad.model.RowKeySet Yes The set of selected rows for this component.
selectionListener javax.el.MethodExpression Only EL a method reference to a selection listener, the method is invoked when the selected nodes are changed.
sizeLabel String Yes Specifies the label describing the size metric of the component. This label will be used in the legend.
sorting String Yes Valid Values: on, off
Default Value: off

Specifies whether the nodes are sorted by size. Valid values are "on" and "off" (default). When sorting is enabled, nodes that have the same parent are sorted in order of descending size.
styleClass String Yes Sets a CSS style class to use for this component.
summary String Yes A summary of the component's purpose and structure for user agents rendering to non-visual media (e.g. screen readers).
value String Yes The data model for the treemap - can be an instance of javax.faces.TreeModel
var String No Name of the EL variable used to reference each element of this collection. Once this component has completed rendering, this variable is removed (or reverted back to its previous value).
varStatus String No Name of the EL variable used to reference the varStatus information. Once this component has completed rendering, this variable is removed (or reverted back to its previous value). The VarStatus provides contextual information about the state of the component to EL expressions. For components that iterate, varStatus also provides loop counter information. Please see the this component's documentation for the specific properties on the varStatus. The common properties on varStatus include:
  • model - returns the CollectionModel for this component
  • index - returns the zero based row index