Skip to main content
100%

Fork of Make a bar chart with react and d3

✓ Published1🌍 Public
TtrwMK
Last edited Oct 14, 2022
Created on Oct 14, 2022

This example shows a bar chart of the 2020 UN population estimates for each country, fetched as a CSV via `d3.csv` and rendered with React as a collection of SVG `<rect>` elements. The code uses `d3.scaleBand` to map country names to vertical positions, with the x-axis width intentionally left incomplete. Data loading is handled through React’s `useState` and `useEffect` hooks, displaying a loading message until the dataset arrives. The visualization relies on React’s state management for updates, while D3 utilities handle data parsing and scaling.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data as a radial burst!

MIT Licensed

Similar vizzes