Skip to main content
Copy for LLM

Treemap

Treemaps visualize hierarchical proportional breakdowns — every leaf is a rectangle whose area is proportional to its value. Common use cases: budget allocation across departments, ad-spend across channels, codebase size per language.

Note: treemap is an ApexCharts-specific chart type. Chart.js does not have a native equivalent.

Basic Example — Marketing budget by channel

Marketing budget allocation (€K)

Multi-dim — Codebase by language

Codebase size by language (kLOC)

Top 15 — proportional shares with in-cell labels + distributed colors

A 100% breakdown (top 15 countries by visitor share on a SaaS landing-page). Cells size by share, label themselves with country and percentage (no hover required), and use ApexCharts' distributed: true plot option so each cell picks a different theme-palette color instead of the value-shaded monochrome default. Reach for this shape when the audience needs both the proportional area AND the explicit values at a glance.

Top 15 countries by visitor share (last 30 days)

Values in the cells

'dataLabels' => ['wkShowValue' => true] in options labels each cell with its name and, on the line below, its value. The value is written as the tooltip writes it: valueDecimals, valuePrefix and valueSuffix apply, in your application's locale, so valueDecimals="1" and valueSuffix="%" read 22.4%, and 22,4% on a German page. The option turns the labels on.

ApexCharts labels only the cells with room for the text; the rest show their name and value in the tooltip. With 'plotOptions' => ['treemap' => ['dataLabels' => ['format' => 'truncate']]] the name and the value share one line, separated by a middle dot. Keep the value out of the x of a data point: the tooltip shows x as its heading and the value below it.

License note

ApexCharts is non-MIT — see the License section on the Chart overview page and apexcharts.com/license for the full terms.

See Also

  • Heatmap for grid-based 2D categorical visualizations
  • Pie + Donut for simple proportional breakdowns

Design Tokens

See ApexCharts adapter — Design Tokens for the color, typography, and grid tokens shared across every ApexCharts demo.

Updated in WireKit v2.66.0 (2026-10-13)

Was this page helpful?

Thank you for your feedback!

Voting requires cookies or local storage. What we store