Skip to main content
100%

Axes with React and D3

✓ Published1🌍 Public
Ttorstenaan
Last edited Feb 25, 2021
Created on Feb 25, 2021
Forked from Margin Convention

This example shows a horizontal bar chart ranking the ten most populous countries using 2020 data from the United Nations World Population Prospects 2019. React manages the component state and lifecycle, fetching the CSV with d3.csv and storing the parsed data via useState. D3 scales, including scaleBand and scaleLinear, position the bars and axes, while the SVG rendering manually draws tick marks, labels, and rectangles rather than using d3.axis.

AI-generated description

Making a simple bar chart using data from United Nations World Population Prospects 2019 Dataset.

MIT Licensed

Similar vizzes