Skip to main content
100%

Fork of Pathetic Bar Chart

✓ Published0🌍 Public
LLisa Wagner
Last edited Aug 24, 2021
Created on Aug 24, 2021
Forked from Pathetic Bar Chart

This gallery example shows the ten most populous countries as horizontal bars without axes or labels, highlighting only relative population sizes. It loads United Nations population data from a CSV file, sorts by 2020 estimates, and maps each country’s value to a rectangle’s width using D3’s `scaleLinear` and `scaleBand` for positioning. The React component manages state with `useState` and `useEffect`, while rendering SVG rects directly via JSX. D3’s `csv` function parses the remote data, which is then displayed through ReactDOM.

AI-generated description

A program that shows the top 10 most populous countries as a pathetic bar chart with no axes.

Data: United Nations World Population Prospects 2019.

MIT Licensed

Similar vizzes