🌍 Public
Viewing a saved revision (read-only)
e7d7af3cc57c465d87cee3b13d02d4be
activity 6_Task 1
This example displays a horizontal bar chart comparing the 2020 population of 30 countries, using a categorical y-axis for country names and a linear x-axis for population values. The visualization is built with React and D3 v5, using `scaleBand` and `scaleLinear` for positioning, with axes rendered via custom React components. Data is loaded asynchronously from a remote CSV file using D3’s `csv` function and formatted with the `format` API to display values in billions. The bars are drawn as SVG rectangles with tooltips showing exact population values.
AI-generated descriptionA demonstration of how to start using D3 version 6.