🌍 Public
Viewing a saved revision (read-only)
45c804d3fe2d44f3af118d5f785ff753
Activity 6
This example shows a horizontal bar chart ranking the populations of 30 countries in 2020, using a scaleBand for the categorical country axis and a scaleLinear for the numeric population axis. The bars are rendered as SVG rectangles with a light green fill that darkens on hover, and each includes a tooltip showing the formatted population value. Built with React and D3 v5, it loads CSV data via `d3.csv`, formats tick labels with `d3.format`, and uses custom axis components to display the population scale with billions abbreviated as "B".
AI-generated description