🌍 Public
Viewing a saved revision (read-only)
df1e4f34792543fcaf400c5a9d5ebf0c
Activity 7 Question 2
This example shows a stacked area chart comparing fruit quantities (apples, oranges, and bananas) across years, rendered as SVG paths using D3.js v7. The code loads CSV data via `d3.csv`, converts numeric fields, stacks the series with `d3.stack`, and maps years to a band scale while quantities use a linear scale. Areas are drawn with a `d3.area` generator, and axes are added using `d3.axisBottom` and `d3.axisLeft`. The visualization includes labeled axes and default color scheme for the stacked series.
AI-generated description