Skip to main content
100%

Pathetic Bar Chart

✓ Published1🌍 Public
JJeff Wagner
Last edited Jun 8, 2023
Created on Jun 7, 2023
Forked from React Starter

This example displays a bar chart of the 2020 populations for the ten most populous countries, sourced from a UN dataset loaded via `d3.csv`. The bars are rendered as SVG `<rect>` elements, with each country's bar width mapped to its population using `d3.scaleLinear` and the vertical position and height determined by `d3.scaleBand`. The chart updates on load after fetching the CSV, initially showing a loading message. The React application uses functional state with `useState` and `useEffect` to manage data fetching and rendering.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes