All effects
Parameter playground

Drag a slider: the demo replays itself so the difference is visible, and the matching number inside the prompt is rewritten. Copy it and you take a prompt tuned to your taste.

Morph time 0.55s Week-to-month morph auto-plays: 0.25s snaps, 1s shows the whole line flowing
Volatility 26 The line redraws instantly: 8 is nearly flat, 60 spikes like an ECG
Charts

Morphing Range Chart

One continuous line that smoothly reshapes as you switch between week, month, and year views.

AI Prompt
Make a range line chart: a week / month / year toggle at the top, and switching smoothly morphs the same line to the new data through point interpolation (morphs over 0.55s, volatility 26) while the gradient area fill below transitions in sync. SVG plus vanilla JS.

How it works

The range line chart's signature move is one line morphing between shapes. Switching week, month, or year does not erase and redraw - the old polyline bends continuously into the new one. The trick is aligning point counts: resample both datasets to the same number of points (interpolating to add, thinning to remove), then run a 300 to 400-millisecond requestAnimationFrame loop that interpolates every point each frame, rewriting the polyline's points attribute. The area gradient underneath is a polygon sharing the same interpolated points, so floor and line deform as one body with zero mismatch.

A cheaper fallback exists when frame-looping feels heavy: resample both ranges to a fixed count (say 30 points) and transition the points attribute with SMIL or CSS. It is less code, but the motion reads slightly less organic than true per-frame interpolation.

How to use this prompt

For stock prices, temperature, traffic - any series viewed at multiple granularities. Provide the three ranges' sample data and the AI generates resampling plus interpolation. When point counts differ wildly (7 against 365), instruct the AI to resample to a fixed count before transitioning, or the morph collapses into a one-frame blur.

Tips for better results

Cap the morph at 350 milliseconds; past half a second users are waiting, not watching. Fading the old line to 60% opacity as the morph starts adds depth cheaply. Keep the area gradient's baseline fixed and let only the top edge follow the line - anchored floors make the deformation feel stable. Roll the y-axis labels numerically during the switch so scale and shape change together. Finally, connect points with a Catmull-Rom style smooth curve instead of straight segments; the beauty difference during morphing is dramatic.

Keep exploring