🌍 Public
Viewing a saved revision (read-only)
494e23134c2547fbb89a1df4c381c33d
Activity6_Q1B
This example shows a horizontal bar chart ranking the top 20 countries by population in 2010, with country names on the y-axis and population values in millions on the x-axis. The chart loads data from a CSV file using `d3.csv` and renders bars as SVG `<rect>` elements sized by a `d3.scaleLinear` x-scale and positioned by a `d3.scaleBand` y-scale. Custom tick components generate labeled axes, and the React code manages state and effects to fetch and sort the data in descending order.
AI-generated description