🌍 Public
Viewing a saved revision (read-only)
471498a2e9b448d4b0ecb56ec3dbaabe
Activity_6_task1
This example shows a horizontal bar chart of the top 30 countries by 2020 population, with each bar labeled by country name and values formatted in billions. The visualization uses React with D3 v5 scales (scaleBand for the y-axis and scaleLinear for the x-axis), rendering SVG rectangles via the Marks component. Data is loaded as CSV from a GitHub repository and processed with d3.csv, with population values multiplied by 1000. The chart includes axis components for bottom and left ticks, plus an "POPULATION-2020" axis label.
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.