Activity6Question2
✓ Published0🌍 Public
This example displays population changes for several countries from 1950 to 2020 using a horizontal bar chart. Each country is assigned a distinct color, and bars extend horizontally to represent population values for each year, with years arranged vertically. The visualization loads D3 v7 via UNPKG, uses `d3.scaleOrdinal` for color assignment, `d3.scaleBand` and `d3.scaleLinear` for axes, and `d3.axisBottom` and `d3.axisLeft` for tick marks. Mouse interactions update a tooltip showing the exact year and population. The underlying data comes from a CSV file containing country names, codes, and yearly population figures.
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.
MIT Licensed