Skip to main content
100%

Fork of Svelte + D3: Random Lines

✓ Published0🌍 Public
CCurran Kelleher
Last edited Jan 29, 2024
Created on Jan 29, 2024

This visualization shows 100 randomly generated lines that smoothly transition to new shapes every second. Each line is a natural cubic spline through a random walk of 100 points, rendered as a stroked SVG path with semi-transparent coloring. The animation leverages the Svelte `tweened` motion primitive combined with the `d3-interpolate-path` library to morph between path states. Svelte's reactive bindings to window dimensions and D3's `scaleLinear` and `extent` functions keep the chart responsive and properly scaled as the viewport changes.

AI-generated description

Random lines with inbuilt responsiveness.

MIT Licensed

Similar vizzes