Skip to main content
100%

area chart

✓ Published0🌍 Public
Ssannihitha.k23@gmail.com
Last edited Apr 14, 2024
Created on Apr 14, 2024
Forked from linechart

An animated SVG area chart depicts yearly cost data from a CSV file, loading via D3's `d3.csv` fetch and rendering with an SVG `path`. The chart maps time-based `year` values on a time scale and `cost` on a linear scale, using `d3.area` to generate the filled region. Interactive red circles, added via `svg.selectAll('dot').data(data).enter()`, display a tooltip on mouseover with the year and cost, while the tooltip div transitions its opacity using D3's `.transition()`.

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