Skip to main content
100%

Fork of Pathetic Bar Chart

✓ Published1🌍 Public
JJohanna Magdalena
Last edited Nov 25, 2021
Created on Nov 25, 2021
Forked from Pathetic Bar Chart

This example visualizes the top 10 most populous countries as a bar chart, with each country’s bar length proportional to its 2020 population from the United Nations World Population Prospects 2019 dataset. The chart uses React with hooks (`useState`, `useEffect`, `useCallback`) to fetch CSV data via `d3.csv`, then renders SVG rectangles positioned using `d3.scaleBand` for the y-axis and `d3.scaleLinear` for the x-axis. The visualization intentionally omits axes and labels, making it a "pathetic" bar chart. The code loads React and D3 v5 from CDNs and renders within a fixed 960×500 SVG.

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