Skip to main content
100%

Fork of Fork of Pathetic Bar Chart

✓ Published0🌍 Public
Pplusbeauxjours
Last edited Sep 13, 2021
Created on Sep 13, 2021

This example shows the top 10 most populous countries as a horizontal bar chart with no visible axes, using React and D3 v5. It loads UN World Population Prospects 2019 data via `d3.csv`, sorts and slices the first ten rows, and renders SVG rectangles with `scaleBand` for the y-axis and `scaleLinear` for the x-axis. The code defines custom React components for the bottom axis and left axis labels, though the left axis is omitted from the final rendering. The chart displays population values encoded as bar widths, with red tick lines on the bottom axis.

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