Skip to main content
100%

Area chart ice 7

✓ Published2🌍 Public
SSreedevi Itta
Last edited Oct 27, 2025
Created on Oct 27, 2025
Forked from Line chart ice 7

This area chart displays the average MPG for vehicles by model year, spanning 1970 to 1982, based on the Auto MPG dataset loaded via `d3.csv`. The chart uses `d3.rollup` and `d3.mean` to aggregate the data, then renders a filled SVG path with `d3.area`, where the baseline sits at the bottom of the plot and the upper edge follows the calculated yearly averages. Axes are generated with `d3.axisBottom` and `d3.axisLeft`, while `d3.scaleLinear` maps the year and MPG values to the chart’s coordinates. A subtle blue fill with a matching stroke highlights the trend in fuel efficiency over time.

AI-generated description
MIT Licensed

Similar vizzes