Treemap
Treemap chart component
Source
LLM docs
Docs
Package
Usage
Treemap is based on the Treemap recharts component.
It displays hierarchical data as a set of nested rectangles:
Nested data
Treemap supports nested data – each data item can have a children array.
The color property on a parent node is used for all its children:
Node color
You can reference colors from theme the same way as in
other components, for example, blue, red.5, orange.7, etc. Any valid CSS
color value is also accepted.
autoContrast
Treemap supports autoContrast prop that automatically adjusts text color
based on the background color of each node to ensure readable labels:
Node stroke
Use the strokeWidth prop to control the width of the stroke around each node.
To change the color of the stroke, use the strokeColor prop:
Disable tooltip
To disable the tooltip, set withTooltip={false}: