🌍 Public
Viewing a saved revision (read-only)
07f128fce2d54c94adf096859445c552
Activity 6_Task 1
A horizontal bar chart displays the 2020 populations of 30 countries, with each bar labeled by country name and the x-axis formatted in billions using D3's `format` function. The visualization is built with React components and D3 v5 scales, using `scaleBand` for the categorical y-axis and `scaleLinear` for the population values. SVG rectangles render the bars, and native `<title>` elements provide tooltips showing the formatted population figures. Data is loaded via `d3.csv` from a GitHub-hosted CSV file, with the population values multiplied by 1,000 during preprocessing.
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.