Skip to main content
100%

Fork of TreeMap Layout

✓ Published1🌍 Public
ZZoha9
Last edited Dec 13, 2022
Created on Dec 13, 2022
Forked from TreeMap Layout

This example displays a treemap visualization of hierarchical data using D3 v5’s `d3.hierarchy` and `d3.treemap` layouts. The SVG renders nested rectangles sized proportionally to node values, with labels for named leaves and empty labels for internal branches. The code manually constructs the dataset in `index.js`, sums values via `root.sum`, and applies layout properties like `paddingOuter`. Rectangles and text are appended into grouped `<g>` elements, with styling from `styles.css` using royal blue fills and white strokes.

AI-generated description

d3indepth.com/layouts/ TreeMap Layout

MIT Licensed

Similar vizzes