Skip to main content
100%

Axes with React & D3

✓ Published102🌍 Public
CCurran Kelleher
Last edited Sep 13, 2019
Created on Sep 13, 2019

This example shows the top 10 most populous countries as horizontal bars, with an x-axis of population ticks and y-axis country labels, all rendered as SVG. The chart is built using React for state and component structure, while D3 v5 functions (`d3.scaleBand`, `d3.scaleLinear`, `d3.max`) handle scaling and tick generation. Data is loaded asynchronously from a CSV of United Nations World Population Prospects 2019, and the axes are manually positioned inside a transformed `<g>` element.

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