Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

HTML Starter

Public visualization

Viewing a saved revision (read-only)

f85b47fdb317403bbf1e976853a0367e

HTML Starter

0 stars0🌍 Public
Ssgalhamdani
Last edited Nov 19, 2020
Created on Oct 8, 2020
Forked from HTML Starter

This example demonstrates a basic treemap visualization using D3.js within an HTML page. It displays hierarchical data from a CSV file as nested rectangles, with each leaf node rendered as a colored square with a white text label. The code uses `d3.stratify()` to convert the flat CSV data into a hierarchy, `d3.treemap()` to compute the layout positions, and SVG `rect` and `text` elements for rendering. The rectangles are filled with a teal color and outlined in black, following the structure of the provided one-level dataset.

AI-generated description

A bare minimum HTML page.

See also React Starter.