🌍 Public
Viewing a saved revision (read-only)
7ba2585b33ab4a8999f96fb7d75893d7
Axes with React & D3
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 descriptionA program that shows the top 10 most populous countries as a pathetic bar chart with no axes.