Skip to main content
Public

Share visualization

Loading preview…

D3 Treemap

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

D3 Treemap

1
GGayan Priyadarshana
Last edited Aug 16, 2023
Created on Aug 16, 2023
Forked from D3 Scatter Plot

This D3 Treemap visualizes hierarchical data by representing each leaf node as a rectangle, with size determined by the `Quantity` field and colored steelblue. It loads comma-separated data from a GitHub Gist using `d3.csv`, parses numeric columns, and applies the `d3.treemap` layout to compute tile positions. The SVG rendering appends grouped rectangles and text labels for each country, with cell dimensions derived from the layout's `x0`, `y0`, `x1`, and `y1` values.

AI-generated description

A vanilla HTML implementation of a D3 scatter plot. Shows the Iris Dataset.

Comments

Sign in to join the discussion.

MIT Licensed