This widget represents grouped data as variables, displayed as a tessellation of polygons whose proportions depend on the number of events represented. These polygons are subdivided into smaller polygons and constitute a hierarchical structure with as many levels as those into which the data is divided (there is a legend above the chart explaining that hierarchy).
This widget is based on FoamTree library.
- Tutorials:
- See:
Methods
# on(str, func)
Attach an event handler function for one event to the widget.
The list of events allowed is:
- displayHelp
- voroSearchChange
- onKeyUp
- onGroupSelectionChanged
- onGroupClick
- onGroupDoubleClick
- onGroupHover
- onModelChanging
- onRolloutComplete
- onRedraw
- onModelChanged
- onRolloutStart
- onRolloutComplete
- onRelaxationStep
- onRedraw
- onViewReset
- onGroupSelectionChanging
- onGroupExposureChanging
- onGroupExposureChanged
- onGroupOpenOrCloseChanging
- onGroupOpenOrCloseChanged
- onGroupHold
- onGroupMouseMove
- onGroupMouseWheel
- onGroupMouseDown
- onGroupMouseUp
- onGroupDragStart
- onGroupDrag
- onGroupDragEnd
- onGroupTransformStart
- onGroupTransform
- onGroupTransformEnd
Parameters:
Name | Type | Description |
---|---|---|
str |
string
|
Name of the event to listen. |
func |
function
|
Function to execute when the event is triggered. |
# setAnimation(enabled)
Display animation effects.
Parameters:
Name | Type | Description |
---|---|---|
enabled |
boolean
|
Indicates if it's enabled. |
# setAttributionLogo(path)
The image to display in the attribution group. The image can be specified as a relative or absolute HTTP URL or a data URI.
Parameters:
Name | Type | Description |
---|---|---|
path |
string
|
Path or url of an image. |
# setColorScale(colorScale)
Set the key color for gradient:
The following values are supported:
- Default
- Artic
- Boreal
- Bruise
- Sunset
- Antartic
- Sky Burst
- Rioja Lightning
- Kamehameha
- Alien
- Rainbow
Parameters:
Name | Type | Description |
---|---|---|
colorScale |
String
|
Color scale name. |
# setColorScaleRelativeTo(relation)
When color scale is enabled, select how color should be calculated. It can be according to all nodes, by siblings or by all elements within the same depth.
The following values are supported:
- all: All nodes.
- siblings: Siblings nodes.
- level: Per level.
Parameters:
Name | Type | Description |
---|---|---|
relation |
string
|
Scale type. |
- Default Value:
- 'all'
# setColorSelection(indexopt)
Index for the dataLabels value that it's used to calculate the node color when color scale is enabled.
It is related to the setting setDataLabels.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
index |
number
|
<optional> |
0 | Index number of datalabel. |
- See:
-
- setEnableColorScale
- setDataLabels
# setCustomProperty(key, val)
Set a custom property to the widget.
Parameters:
Name | Type | Description |
---|---|---|
key |
string
|
Key to set, using dot notation. |
val |
*
|
Value to set |
# setDarkenFlatParents(boolopt)
Set the darken flat parents.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
bool |
boolean
|
<optional> |
true | Enable darken flat parents. |
# setDarkenFlatParentsColor(arropt)
Set the darken flat parents colors when it's enabled.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
arr |
Array.<string>
|
<optional> |
['#595959', '#080808'] | Array of colors. |
# setDarkenFlatParentsHoveredColor(coloropt)
Set the hover effect color when use darken flat parents is enabled.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
color |
string
|
<optional> |
'#797878' | Color for the hover effect. |
# setDataLabels(dataLabels)
Set the name of the values.
Parameters:
Name | Type | Description |
---|---|---|
dataLabels |
Array.<string>
|
Array of labels. |
- Default Value:
- ['count']
# setEnableColorScale(boolopt)
Set enabled color scale selector.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
bool |
boolean
|
<optional> |
true | Enable color scale. |
# setEnableDetailView(boolopt)
Enable detailed view for comparations.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
bool |
boolean
|
<optional> |
true | Enable detailed view. |
# setEnablePartitioning(boolopt)
Enable the partitioning functionality.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
bool |
boolean
|
<optional> |
true | Enable partitioning |
# setEnableSizeSelect(boolopt)
Enable the size selector.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
bool |
boolean
|
<optional> |
true | Enable size selector. |
# setExposeCurrentNode(exposeCurrentNode)
Set the exposed groups.
For more info vistit this info.
Parameters:
Name | Type | Description |
---|---|---|
exposeCurrentNode |
Array.<string>
|
Array of groups to expose. |
# setFlatSignals(bool)
Determines how FoamTree will display nested groups. When it's set true, produces a flattened view of the hierarchy.
Parameters:
Name | Type | Description |
---|---|---|
bool |
boolean
|
Boolean value. |
# setKeys(keys)
Set the keys to display.
Parameters:
Name | Type | Description |
---|---|---|
keys |
Array.<string>
|
Array of keys. |
# setKeysOrder(keysOrder)
Set the order of keys.
Parameters:
Name | Type | Description |
---|---|---|
keysOrder |
Array.<string>
|
Array of keys ordered. |
# setLayout(layout)
Determines the general type of layout to generate. Depending on this option, FoamTree will produce polygon-based organic-looking visualization or the traditional rectangular tree map.
The following values are supported:
- relaxed: produces polygonal organic-looking arrangements based on Voronoi diagrams.
- ordered: produces the traditional rectangular treemap using the strip algorithm.
- squarified: produces the traditional treemap using the squarified algorithm.
Parameters:
Name | Type | Description |
---|---|---|
layout |
string
|
Layout type. |
# setLegendPercentage(enabled)
Enable legend percentage display.
Parameters:
Name | Type | Description |
---|---|---|
enabled |
boolean
|
Indicates if it's enabled. |
# setLegendVal(enabled)
Enable legend display.
Parameters:
Name | Type | Description |
---|---|---|
enabled |
boolean
|
Indicates if it's enabled. |
# setMaxItems(numopt)
Set maximum total nodes.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
num |
number
|
<optional> |
1000 | Number of nodes to show. |
# setMaxLevelItems(numopt)
Set maximum total nodes per level.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
num |
number
|
<optional> |
1000 | Number of nodes to show. |
# setOperation(operation)
Set the operation used to scale data.
The following values are supported:
- none: No operation.
- log: Logarithmic operation.
- atan: Arctangent operation.
- pow.75: Power 0.75 operation.
- pow.33: Power 0.33 operation.
- pow.25: Power 0.25 operation.
- sqrt: Square root operation.
Parameters:
Name | Type | Description |
---|---|---|
operation |
string
|
Operation name. |
- Default Value:
- 'none'
# setPartitioningBorder(numopt)
Set the border width on partitioning.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
num |
number
|
<optional> |
2 | Number of width border. |
# setRelaxationInitializer(relaxationopt)
Determines the initial layout of groups' polygons.
The following values are supported:
- fisheye: puts large groups in the center of the visualization area and the smaller groups towards the corners.
- blackhole: puts small groups in the center of the visualization and the larger groups towards the corners.
- ordered: lays out the groups in a left-to-right lines, in the order the groups were specified in the data object.
- squarified: puts large groups close to the top-left corner of the visualization and the small groups close to the bottom-right corner.
- random: puts groups at random positions.
Note: Applicable only when setLayout is set to relaxed.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
relaxation |
string
|
<optional> |
'fisheye' | Layout relaxation. |
# setScrollZoom(enable)
Set scroll or zoom to enabled.
Parameters:
Name | Type | Description |
---|---|---|
enable |
boolean
|
Indicates if it's enabled. |
- Default Value:
- false
# setShowZero(showzero)
Set groups whose weight is zero as visible.
For more info vistit this info.
Parameters:
Name | Type | Description |
---|---|---|
showzero |
boolean
|
Indicates if it's enabled. |
# setSizeSelection(indexopt)
Set the index for the dataLabels value that it's used to calculate the node size.
It's related to the setting setDataLabels.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
index |
Number
|
<optional> |
0 | Index number of datalabel. |
- See:
-
- setEnableSizeSelect
- setDataLabels
# setValue(value)
Set the value to display.
Parameters:
Name | Type | Description |
---|---|---|
value |
Object
|
|
value |
string
|
Value to show. |
Example
{ value: 'count'}
# setValueFormat(valueFormat)
Set the data representation.
The following values are supported:
- ['toBytes']: Byte representation.
- ['secondsToHMS']: Time representation
Parameters:
Name | Type | Description |
---|---|---|
valueFormat |
Array.<string>
|
Array with the string name of the format. |