🌍 Public
Viewing a saved revision (read-only)
91c9f3c1d97048678476a8358a3f2a05
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 descriptionA bare minimum HTML page.
See also React Starter.