Skip to main content
100%

Fork of Axes with React & D3

✓ Published0🌍 Public
Mmarco-irene
Last edited Nov 26, 2022
Created on Nov 26, 2022

This example displays a horizontal bar chart of the top 10 most populous countries, using data from the United Nations World Population Prospects 2019. The chart renders as SVG via React, with D3’s `scaleBand` and `scaleLinear` computing the bar positions, while custom React components draw the axis ticks and labels. Axis lines and text are generated manually using `xScale.ticks()` and `yScale.domain()`, without relying on D3’s axis component. The code loads CSV data with `d3.csv` and manages state through React hooks.

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