treemap
Configuration Structure
treemap: {}plotOptions
enabled
trueParent containers appear on their own as soon as the data carries children. Set false to force the flat two-level layout regardless.
Available Options:
- true (default)
- false
drilldownAsLevels
falseRead drilldown: '<id>' ids as extra levels of the hierarchy instead of as a click target for the drilldown feature.
Defaults to false, because on a treemap that id has always meant "descend on click".
Available Options:
- true
- false (default)
parents
How a branch is drawn once the data is nested: the header strip, its label and padding. Accepts the same shape as a level. Per-depth overrides go in levels.
show
'auto'Whether branch containers are drawn.
Available Options:
- 'auto' (default): on when the data carries
children. - true
- false
formatter
Custom tooltip for a branch. Receives { name, value, depth, leafCount, percentOfParent, percentOfTotal, node, w } and returns an HTML string.
percentOfParent and percentOfTotal are the two questions a nested treemap actually raises, so they are passed rather than left to be derived.
levels
Per-depth overrides of parents, indexed from the outermost group actually drawn (0 = the series, or the first authored level when a single series is unwrapped).
enableShades
trueEnable different shades of color depending on the value
shadeIntensity
0.5The intensity of the shades generated for each value
Accepts from 0 to 1
reverseNegativeShade
trueWhen enabled, it will reverse the shades for negatives but keep the positive shades as it is now. An example of such use-case would be in a profit/loss chart where darker reds mean larger losses, darker greens mean larger gains.
distributed
falseWhen turned on, each series in a treemap will have it's own lowest and highest range and colors will be shaded for each series. Default value is false.
useFillColorAsStroke
falseWhen turned on, the stroke/border around the treemap cell has the same color as the cell color.
borderRadius
0Rounds the corners of every treemap tile. Set to 0 for square corners.
seriesTitle
Header label rendered at the top of each series' treemap region. Useful in multi-series treemaps to identify which group each tile cluster belongs to.
show
Show or hide the series title bar.
offsetX
Left offset for the series title.
offsetY
Top offset for the series title.
borderColor
Border color around the series title.
borderWidth
Border width around the series title.
borderRadius
Border radius applied to the corners of the series title background.
style
Text styling for the series title.
background
Background color of the series title bar.
color
Text color of the series title.
fontSize
Font size of the series title.
fontFamily
Font family of the series title.
fontWeight
Font weight of the series title.
cssClass
Optional CSS class added to the series title element for custom styling.
padding
Padding applied around the series title text.
left
Left padding of the series title.
right
Right padding of the series title.
top
Top padding of the series title.
bottom
Bottom padding of the series title.
dataLabels
format
You can either set the labels to scale based on the box size, or you can keep the same font-dize and let the labels truncate if they exceed the area. Below are the available options:
- scale
- truncate
colorScale
ranges
from
Value indicating range's upper limit
to
Value indicating range's lower limit
color
Background color to fill the range with.
foreColor
Fore Color of the text if data-labels is enabled.
inverse
In a multiple series treemap, flip the color-scale to fill the treemaps vertically instead of horizontally.
min
Specify the lower range for treemap color calculation.
max
Specify the higher range for treemap color calculation.