Skip to main content
Public

Share visualization

Loading preview…

Tree Map

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

Tree Map

1
DDasbach.EJ
Last edited Jul 1, 2021
Created on Jul 1, 2021
Forked from Network Simulation

This tree map visualizes hierarchical sales data for US states and cities using a treemap layout. The visualization encodes each leaf node as a rectangle, with area proportional to sales values and color assigned by parent state via an ordinal scale with the Tableau 10 scheme. The code loads data from a JSON file using `d3.json`, builds a hierarchy with `d3.hierarchy` and `sum`, then applies `d3.treemap` to compute positions. Rectangles and white labels are rendered as SVG elements within a container group.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed