🌍 Public
Viewing a saved revision (read-only)
a4c3b3d64c1f4883a8a98905d4900325
Activity6_Task1
This visualization displays the population of 30 countries in 2020 as a horizontal bar chart, with bars sorted by country name and lengths proportional to population. Built with React and D3 v5, it uses `scaleBand` for the categorical y-axis, `scaleLinear` for the numeric x-axis, and renders bars as SVG `<rect>` elements. The data is fetched from a CSV via `d3.csv`, with population values converted from thousands. Tooltips show the exact population values, and axis labels are formatted using `d3.format` with 'G' replaced by 'B' for billions.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.