Skip to main content
100%

Fork of Pathetic Bar Chart

✓ Published0🌍 Public
Kkoubaib ben yedder
Last edited Aug 27, 2022
Created on Aug 27, 2022
Forked from Pathetic Bar Chart

This example displays the top 10 most populous countries as a minimalist set of horizontal bars, with no axes or labels, using React to manage state and render SVG rectangles. The code loads United Nations World Population Prospects 2019 data via `d3.csv`, then applies `d3.scaleBand` for the y-axis positioning and `d3.scaleLinear` for the bar widths. It uses `useState` and `useEffect` hooks to asynchronously fetch and slice the data, and `d3.max` to set the x-scale domain.

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