🌍 Public
Viewing a saved revision (read-only)
06ab6a511f434fa1b7bbda9c14937812
activity 6_Task 1
This visualization displays the 2020 population estimates for 30 countries as a horizontal bar chart, with the x-axis formatted in billions using D3’s `format` function. The bars are rendered as SVG rectangles scaled by `scaleLinear` and `scaleBand`, while custom `AxisBottom` and `AxisLeft` components generate the tick marks and labels. The data is loaded from a CSV file via `d3.csv`, and hover tooltips show exact values through the native SVG `<title>` element. The chart is built with React and D3 v5, using `useState` and `useEffect` for data fetching.
AI-generated descriptionA demonstration of how to start using D3 version 6.