Skip to main content
100%

Bar Chart w React and D3

✓ Published1🌍 Public
EErik
Last edited Oct 13, 2021
Created on Oct 13, 2021

A bar chart displays United Nations population data for the top four countries by 2020 estimates. The graphic uses React’s `useState` and `useEffect` hooks to asynchronously fetch and parse a CSV via `d3.csv`, then renders SVG `<rect>` elements whose widths are scaled by `d3.scaleLinear` and vertical positions by `d3.scaleBand`. The horizontal bars are plotted against a fixed 960×500 viewport, with countries arranged from top to bottom in data order.

AI-generated description

Smiley face implementation with React & D3.

MIT Licensed

Similar vizzes