Activity7_Q2
✓ Published0🌍 Public
A stacked area chart displays population trends by continent over time, aggregating country-level data into five continental groups. D3 v6 loads population data from a CSV URL and maps countries to continents before stacking the values. The visualization uses `d3.stack`, `d3.area`, `scaleTime`, `scaleLinear`, and `scaleOrdinal` to render smooth curves with a color legend. Data spans multiple years, with axes formatted via `axisBottom` and `axisLeft`. The chart renders as an SVG appended to the HTML body, with the `curveBasis` interpolation applied to the area generator.
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