area chart
✓ Published0🌍 Public
This example shows a stacked area chart of population trends over time for multiple groups, with a legend identifying each series. It loads CSV data from a GitHub gist, using `d3.csv`, and renders the chart as SVG. The code uses `d3.stack` to compute layered series, `d3.area` with `y0` and `y1` accessors to generate paths, and `d3.scaleOrdinal` with `d3.schemeSet2` for colors. Axes are drawn with `d3.axisBottom` and `d3.axisLeft`, with data-driven tick formatting via `d3.format`.
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