🌍 Public
Viewing a saved revision (read-only)
ce80a9e1ccbd492a9550609e043f7a05
Activity6_Task1
This bar chart displays the 2020 population of 30 countries, with countries listed on the vertical axis and population values represented by horizontal bar lengths. The visualization is built using React with D3 v5 for data loading and scales, rendering to SVG. The code uses `scaleBand` for the categorical y-axis, `scaleLinear` for the quantitative x-axis, and `format` for abbreviating population labels (e.g., converting billions to "B"). Data comes from a remote CSV file via `d3.csv`, with population values multiplied by 1000 during parsing.
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.