Skip to main content
100%

Rendering data with react

✓ Published0🌍 Public
SSayyam Aneja
Last edited Nov 24, 2022
Created on Nov 24, 2022

A bar chart displays the top 10 countries by projected 2020 population from a UN dataset. Built with React and D3 v5, it uses `useState` and `useEffect` to load CSV data via `d3.csv`, then renders SVG rectangles. Scales `d3.scaleBand` and `d3.scaleLinear` map country names and population values to pixel positions, with margins applied inside a transformed `<g>` element.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React state to keep track of the data.

MIT Licensed

Similar vizzes