Skip to main content
100%

Treemap layout (with labels)

✓ Published1🌍 Public
Yyuva24
Last edited Jan 31, 2021
Created on Jan 31, 2021
Forked from HTML Starter

A treemap layout visualizes a small hierarchical dataset, with nested rectangles representing the root node A1, its children B1 and B2, and the grandchildren C1, C2, and C3. Each rectangle is colored cadetblue, and labels show the node names. The example uses the `d3.treemap` layout with `d3.hierarchy` and `rootNode.sum` to compute sizes, then renders the result as SVG rectangles and text elements via data joins on `g` nodes.

AI-generated description
MIT Licensed

Similar vizzes