Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Pathetic Bar Chart

Public visualization

Viewing a saved revision (read-only)

3e9a536733954da1bcf9e14ac3f6af10

Fork of Pathetic Bar Chart

0 stars0🌍 Public
Llatifiss
Last edited Sep 3, 2022
Created on Sep 3, 2022
Forked from Pathetic Bar Chart

This example shows the top 10 most populous countries as a series of horizontal bars with no axes or labels, using a deliberately minimal design. The bars are rendered as SVG rectangles whose widths encode each country’s 2020 population, sorted from largest to smallest. The code loads CSV data from the United Nations World Population Prospects 2019 via D3’s `csv` function, then uses `scaleBand` for the y-axis positions and `scaleLinear` for bar widths. React’s `useState` and `useEffect` hooks manage the asynchronous data loading, while the bars are mapped directly from the fetched array.

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.