Bar Chart
✓ Published0🌍 Public
This example shows the top 10 most populous countries in 2020 as a horizontal bar chart, with country names on the y-axis and population on the x-axis. The chart uses React to render SVG elements, with d3.scaleBand and d3.scaleLinear for positioning, and d3.format for axis tick labels that abbreviate large numbers. Data loads from a CSV file of the United Nations World Population Prospects 2019, filtered to the first ten rows. Hovering over a bar reveals a tooltip with the formatted population value.
AI-generated descriptionA program that shows the top 10 most populous countries as a bar chart.
MIT Licensed