Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Treemap

Public visualization

Treemap

0 stars3🌍 Public
Hhanulik.ondrej@gmail.com
Last edited Aug 21, 2022
Created on Aug 21, 2022
Forked from bubble

This treemap visualizes hierarchical data from a CSV file, showing production values for countries grouped under parent categories as nested rectangles. The example uses D3.js v6 with a CSV-parsed hierarchy, stratifying the data via `d3.stratify()` and computing rectangle positions with `d3.treemap()`. Rectangles are rendered as SVG elements with a teal fill and black stroke, while country labels appear in white text within each cell. The layout uses a fixed canvas size with padding between nodes, and styling comes from the included CSS.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed