Skip to main content
100%

Fork of Axes with React & D3

✓ Published0🌍 Public
Vvigneswaran009
Last edited May 12, 2021
Created on May 12, 2021

This example displays the top 10 most populous countries as horizontal bars, with country names on the left and numeric population values along the bottom axis. It loads UN population data from 2019 using `d3.csv`, then renders the chart as SVG through React components. The code uses D3’s `scaleBand` for the y-axis, `scaleLinear` for the x-axis, and manually draws tick lines and labels for both axes. React state management and hooks coordinate the asynchronous data loading and conditional rendering.

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