Skip to main content
100%

d3 template

✓ Published1🌍 Public
NNita
Last edited Dec 10, 2020
Created on Dec 10, 2020
Forked from d3 template

This example renders a treemap visualization using D3.js v6 in a React environment. It displays hierarchical data as nested rectangles, with each leaf node's area representing its value and labeled with its name. The code loads JSON data from a remote GitHub source, converts it into a hierarchy using `d3.hierarchy`, then computes the spatial layout with `d3.treemap`. The resulting SVG rectangles and text labels are appended to the chart, with leaves filled in slate blue, providing a clear visual breakdown of the data's composition.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes