Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering data with react

Public visualization

Rendering data with react

0 stars0🌍 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.

Comments

Sign in to join the discussion.

MIT Licensed