Skip to main content
100%

project-SDV 4

✓ Published0🌍 Public
RRuthvik Bairaboina
Last edited Dec 5, 2025
Created on Nov 4, 2025
Forked from D3 Starter

This stacked area chart visualizes the average prices of U.S. gasoline, broken down into overall, regular, and midgrade averages, across a weekly timeline. The chart uses a total height to represent the sum of these three averages for each date. Built with D3.js v7, the code computes the averages from the raw data, stacks them using `d3.stack()`, and renders the areas with `d3.area()`. An interactive legend allows users to isolate individual averages by dimming the others, and a tooltip displays precise values via a nearest-date bisector. The data is sourced from the provided CSV file.

AI-generated description
MIT Licensed

Similar vizzes