Skip to main content
100%

Axes with React & D3

✓ Published0🌍 Public
JJenny
Last edited Mar 8, 2021
Created on Mar 4, 2021

This example shows a horizontal bar chart of the top 10 most populous countries, with labeled axes and tooltips. Using React to construct SVG elements, the code creates bottom and left axes with D3’s `scaleBand` and `scaleLinear`, applies a custom tick formatter for population values, and renders bars as `<rect>` elements with `<title>` tooltips. Data comes from the UN World Population Prospects 2019 CSV.

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