Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Pathetic Bar Chart

Public visualization

Fork of Pathetic Bar Chart

0 stars0🌍 Public
MMathieuSchaff
Last edited May 24, 2022
Created on May 24, 2022
Forked from Pathetic Bar Chart

This example shows the top 10 most populous countries as a set of horizontal rectangles, with lengths proportional to each country’s 2020 population, and no axes or labels. The visualization uses React with React hooks—`useState` and `useEffect`—to load a CSV from the United Nations World Population Prospects 2019 via `d3.csv`, then slices the first ten rows. Scaling relies on `d3.scaleBand` for vertical positioning and `d3.scaleLinear` for bar widths, with the SVG rendered declaratively through React’s JSX.

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.

Comments

Sign in to join the discussion.

MIT Licensed