Skip to main content
100%

Pathetic Bar Chart

✓ Published0🌍 Public
TTrustPaul
Last edited Nov 27, 2020
Created on Nov 27, 2020
Forked from Pathetic Bar Chart

This example shows the top 10 most populous countries as horizontal bars, with no axes or labels, making the chart deliberately bare and difficult to interpret. The bars are rendered as SVG rectangles inside a React component, using the `useState` and `useEffect` hooks to load and manage data. It fetches population data from the United Nations World Population Prospects 2019 via `d3.csv`, then uses `d3.scaleBand` for the y-axis positioning and `d3.scaleLinear` for the x-axis scaling, with `d3.max` to determine the domain. The chart intentionally omits axes, ticks, and labels, leaving only colored rectangles of varying widths.

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