Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Axes with React and D3

Public visualization

Viewing a saved revision (read-only)

52548a36f788426380f04d7883cf75bd

Axes with React and D3

0 stars1🌍 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.