Skip to main content
100%

Axes with React & D3

✓ Published0🌍 Public
Llaplantalaplanta
Last edited Jan 24, 2022
Created on Jan 24, 2022

This example uses D3 and React to render a horizontal bar chart of the ten most populous countries from the United Nations World Population Prospects 2019 dataset. It displays population values for 2020 with x-axis tick marks generated via `xScale.ticks()` and country labels positioned using a band scale. The chart includes only these axes and bars—no gridlines or margins beyond the SVG viewport. The code loads data with `d3.csv` and uses `scaleBand` and `scaleLinear` for layout.

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