Skip to main content
100%

Pathetic Bar Chart

✓ Published0🌍 Public
Bbingsen0806
Last edited Jun 15, 2021
Created on Jun 15, 2021
Forked from Pathetic Bar Chart

This example displays the top 10 most populous countries as a bar chart with no axes, labels, or tick marks, making the bars appear oddly floating and "pathetic." It uses React hooks (`useState`, `useEffect`, `useCallback`) to fetch and sort data from the United Nations World Population Prospects 2019 CSV via `d3.csv`, then renders SVG `<rect>` elements using `d3.scaleBand` for the y-axis positions and `d3.scaleLinear` with `d3.max` for the widths. The chart updates asynchronously, showing a loading message until data arrives.

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