Skip to main content
100%

Axes with React & D3

✓ Published1🌍 Public
WWolfgang
Last edited Mar 20, 2021
Created on Mar 20, 2021

This example shows the top 10 most populous countries from the United Nations World Population Prospects 2019 as a bar chart with axes. It uses React state to load CSV data via d3.csv, then renders SVG rectangles and axis ticks manually with d3.scaleBand, d3.scaleLinear, and d3.max. The x-axis ticks are generated from xScale.ticks(), with grid lines and labels, while the y-axis displays country names.

AI-generated description

A program that shows the top 10 most populous countries as a pathetic bar chart with implemented axes.

Data: United Nations World Population Prospects 2019.

MIT Licensed

Similar vizzes