Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Treemap layout (with labels)

Public visualization

Treemap layout (with labels)

0 stars1🌍 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

Comments

Sign in to join the discussion.

MIT Licensed