Skip to main content
100%

Svelte + D3: Reveal area chart

✓ Published3🌍 Public
MMatthias Stahl
Last edited Nov 26, 2025
Created on Jan 29, 2024

A responsive area chart reveals a pink-filled curve and its stroke line from behind a sliding rectangular mask. Built with Svelte and D3, the visualization maps a fixed dataset of x and y values using `scaleLinear` and renders smooth paths via `line` and `area` generators with a Catmull-Rom curve. A CSS animation slides the overlay rect across the SVG, progressively unveiling the chart. The visualization demonstrates reactive sizing through Svelte's `bind:clientWidth` and `bind:clientHeight`.

AI-generated description
MIT Licensed

Similar vizzes