Skip to main content
100%

Activity7_Q2

✓ Published0🌍 Public
SShiva Sai Reddy
Last edited Nov 6, 2024
Created on Nov 6, 2024
Forked from Hello VizHub

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes