Skip to main content
100%

Fork of Pathetic Bar Chart

✓ Published0🌍 Public
Aavgoust
Last edited May 15, 2022
Created on May 15, 2022
Forked from Pathetic Bar Chart

This example shows the top 10 most populous countries as a bar chart with no axes, labels, or other context. It fetches United Nations World Population Prospects 2019 data from a GitHub gist via `d3.csv`, then sorts and slices the first ten rows. Using `d3.scaleBand` for the y-axis and `d3.scaleLinear` for the x-axis, it renders SVG `<rect>` elements inside a React component. The bars use `yScale.bandwidth()` for height and `xScale(d.Population)` for width, with React `useState` and `useEffect` managing the asynchronous data loading.

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