Skip to main content
Public

Share visualization

Loading preview…

Treemap layout (with labels)

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Treemap layout (with labels)

1
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