Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

The Pathetic Bar Chart

Public visualization

The Pathetic Bar Chart

0 stars1🌍 Public
Yyejichun@naver.com
Last edited Dec 19, 2021
Created on Dec 18, 2021

This visualization displays the top ten most populous countries in 2020 as horizontal bars, with each country’s bar length proportional to its population. Using React state to manage data loading, the code fetches a CSV of UN population data via `d3.csv`, then renders SVG rectangles positioned by `d3.scaleBand` and sized by `d3.scaleLinear`. The bars are plain rectangles without labels or axes, hence the “pathetic” title. React’s `useEffect` and `useState` hooks drive the asynchronous data fetch and rendering.

AI-generated description

A program that loads in some data about CSS named colors using D3 utilities, and uses React state to render the data.

Comments

Sign in to join the discussion.

MIT Licensed