Stylized Bar Chart
✓ Published0🌍 Public
This example shows the top 10 most populous countries in 2020 as a horizontal bar chart, using data from the United Nations World Population Prospects 2019. Bars are rendered as SVG `<rect>` elements sized by a d3.scaleLinear x-axis and positioned by a d3.scaleBand y-axis. The React components AxisBottom and AxisLeft generate tick marks and labels, while native SVG `<title>` tags provide tooltips. Styling uses the Poppins font and a teal color scheme, with population values formatted via d3.format and abbreviated with "B" for billions.
AI-generated descriptionA program that shows the top 10 most populous countries as a bar chart.
MIT Licensed