Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Rendering data with react

Public visualization

Rendering data with react

0 stars2🌍 Public
SSreekar Reddy
Last edited May 13, 2021
Created on May 13, 2021

A bar chart displays the top 10 countries by 2020 population, loaded from a UN dataset via `d3.csv`. React's `useState` and `useEffect` manage the asynchronous data fetching, while `d3.scaleBand` positions bars on the y-axis and `d3.scaleLinear` maps population values to widths. The SVG rectangles render through React components, with `d3.max` setting the x-domain.

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