🌍 Public
Viewing a saved revision (read-only)
d409a065e3984d3aab387960419eb3b4
Fork of Activity 7
This example shows the 30 most populous countries in 2020 as a horizontal bar chart, with each bar’s length encoding population size and a tooltip revealing the exact value. The chart is rendered as SVG using React components for the axes and marks, while D3’s `scaleBand` and `scaleLinear` handle the positional scales. Data is loaded from a CSV file via a custom `useData` hook and the `d3.csv` function, with population values formatted using `d3.format`.
AI-generated descriptionA demonstration of how to start using D3 version 6.