Charts · Gutenberg
Treemap Chart block for WordPress
Hierarchical data visualized as proportional nested rectangles. Great for market share, budget breakdowns, and category comparisons.
Get Blockenberg
Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.
What it actually does
Hierarchical data visualized as proportional nested rectangles. Great for market share, budget breakdowns, and category comparisons.
Inspector panels on this block: Chart Settings, Canvas & Style, Data Items. Those titles come from index.js, not from a shared template.
Treemap Chart has no render.php and no frontend.js. The saved Gutenberg HTML is what visitors see, plus Blockenberg layout/typography CSS.
Where to find it
Gutenberg inserter → Charts → search “Treemap Chart” (block name `blockenberg/treemap-chart` in block.json). Style it in the sidebar after insert.
How to use Treemap Chart block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Treemap Chart”, insert it. Category: Charts.
- Configure inspector controls that exist on this block. Open Chart Settings. Set “Chart Settings — Title”, “Show Title”, “Show Labels”, “Show Values”.
- Publish. Save the page. Output is the saved block HTML; typography/colors follow Blockenberg shared panels.
Inspector controls from this block’s code
| Control | What the code does |
|---|---|
| Chart Settings — Title | Text field in the inspector. block.json default: Market Share. Saved as `title`. |
| Show Title | On/off toggle in the inspector. On by default. Saved as `showTitle`. |
| Show Labels | On/off toggle in the inspector. On by default. Saved as `showLabels`. |
| Show Values | On/off toggle in the inspector. On by default. Saved as `showValues`. |
| Show as Percent | On/off toggle in the inspector. Off by default. Saved as `showPercent`. |
| Canvas & Style — Width | Numeric range control in the inspector. Range 300–1200. block.json default: 800. Saved as `svgWidth`. |
| Canvas & Style — Height | Numeric range control in the inspector. Range 200–800. block.json default: 480. Saved as `svgHeight`. |
| Cell Gap | Numeric range control in the inspector. Range 0–16. block.json default: 3. Saved as `gap`. |
| Corner Radius | Numeric range control in the inspector. Range 0–20. block.json default: 4. Saved as `cornerRadius`. |
| Label Font Size | Numeric range control in the inspector. Range 8–24. block.json default: 14. Saved as `labelFontSize`. |
| Value Font Size | Numeric range control in the inspector. Range 8–20. block.json default: 12. Saved as `valueFontSize`. |
| Colors — Background | Color control in the inspector. block.json default: #ffffff. Saved as `bgColor`. |
| Title Color | Color control in the inspector. block.json default: #111827. Saved as `titleColor`. |
| Label | Text field in the inspector. |
| Value | Numeric range control in the inspector. Range 1–1000. |
When this is the right block
- Hierarchical data visualized as proportional nested rectangles. Great for market share, budget breakdowns, and category comparisons — that is the job of Treemap Chart, not a generic content block.
- Use it when you need the editor control labeled “Chart Settings — Title”, which exists on this block’s inspector.
- It matches pages about treemap, chart, hierarchy.
- Inserter grouping: reports, dashboards, and data-heavy pages.
Notes from the implementation
Static block: markup is saved in post content; no PHP render callback in this folder.
FAQ
How do I add the Treemap Chart block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Treemap Chart”. It sits under Charts. After insert, open Chart Settings and set “Chart Settings — Title”, “Show Title”, “Show Labels”, “Show Values”.
What makes Treemap Chart different from other Blockenberg blocks?
Hierarchical data visualized as proportional nested rectangles. Great for market share, budget breakdowns, and category comparisons. Inspector labels on this block include “Chart Settings — Title”, “Show Title”, “Show Labels”, “Show Values”.
Is the Treemap Chart Gutenberg block free?
Yes. Treemap Chart ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Treemap Chart to match my theme?
Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Chart Settings, Canvas & Style, Data Items).
Related charts blocks
Area Chart
Smooth filled area chart with multiple datasets, gradient fills, and animation using Chart.js (CDN). Great for showing trends over time.
Bar Chart
Vertical or horizontal bar chart with multiple datasets using Chart.js (CDN). Supports stacked, border radius, and custom colors.
Doughnut Chart
Pie/doughnut chart with adjustable cutout, center label, and per-slice colors using Chart.js (CDN).
Line Chart
Interactive line chart using Chart.js (loaded from CDN). Supports multiple datasets, fill, tension, and grid styling.
Polar Area Chart
Beautiful polar area chart powered by Chart.js.
Radar Chart
Spider/radar chart with multiple datasets, fill transparency, and axis customization using Chart.js (CDN).
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Treemap Chart from the Gutenberg inserter.