Skip to main content
100%

Fork of Pathetic Bar Chart

✓ Published0🌍 Public
HHaris Abdullah
Last edited Sep 28, 2021
Created on Sep 28, 2021
Forked from Pathetic Bar Chart

This example visualizes the top 10 most populous countries as a primitive bar chart with no axes or labels, using horizontal rectangles whose widths encode each country’s 2020 population. The chart focuses solely on raw bar lengths, omitting scales or ticks for a deliberately minimal aesthetic. Built with React (using `useState` and `useEffect`) and D3 v5, it loads CSV data from a GitHub Gist via `d3.csv`, transforms the population column to a number, and slices the first 10 rows. D3’s `scaleBand` positions the bars vertically, while `scaleLinear` maps population values to pixel widths, and React renders each bar as an SVG `<rect>`.

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