Skip to content

excel chart treemap

zmworm edited this page Apr 13, 2026 · 16 revisions

Excel: Chart - treemap

A dedicated page for the treemap chart type. Treemaps are part of Excel's cx:chart (extended chart, Office 2016+) family. They display hierarchical data as nested rectangles where each cell's area is proportional to its value.

Path: /{SheetName}/chart[N]

See also: Chart - add, Chart - set, histogram for the full shared cx styling vocabulary.

Data format

Single series with numeric values. Categories provide cell labels.

officecli add data.xlsx /Sheet1 --type chart \
  --prop chartType=treemap \
  --prop title="Revenue by Product" \
  --prop series1="Revenue:400,300,200,150,100,80,50" \
  --prop categories="Product A,Product B,Product C,Product D,Product E,Product F,Product G"

Treemap-specific properties

Property Default Notes
parentLabelLayout overlapping How parent category labels are placed
Value Description
overlapping Labels overlap children (default)
banner Labels in a separate banner strip
none No parent labels
officecli add data.xlsx /Sheet1 --type chart \
  --prop chartType=treemap \
  --prop series1="Sales:400,300,200,100" \
  --prop categories="A,B,C,D" \
  --prop parentLabelLayout=banner

officecli set data.xlsx /Sheet1/chart[1] --prop parentLabelLayout=none

Shared cx styling

Treemap shares the full cx styling vocabulary with funnel, sunburst, boxWhisker, and histogram. See funnel or histogram for the complete property list covering title, legend, colors, data labels, fills, and borders.

HTML preview support

Feature Preview Notes
Squarified layout Yes Bruls et al. algorithm
Proportional cell areas Yes
Per-cell colors Yes Cycled through palette
Cell labels Yes Hidden when cell is too small (<40px wide or <18px tall)
White cell borders Yes

See Also


Based on OfficeCLI v1.0.43

Clone this wiki locally