Skip to main content
100%

Tree Map

✓ Published1🌍 Public
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.

MIT Licensed

Similar vizzes