Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of fruit - General update pattern

Public visualization

Viewing a saved revision (read-only)

e5726b0f37fe4dcea7eb8da316dd38c5

Bowl of fruit - General update pattern

0 stars1🌍 Public
AAnthony-coding
Last edited Nov 26, 2019
Created on Nov 13, 2019
Forked from Hello VizHub

Five apples sit in a row, then the bowl loses an apple, swaps one for a lemon, and drops another apple. The animation demonstrates the general update pattern, using `transition.duration(1000)` to smoothly animate new, existing, and exiting circles. The D3 v5 code uses `data(fruits, d => d.id)` with `Math.random()` IDs, and while an `enter` state starts radii at zero, no explicit `update` transition is defined, though the merge transition applies to all circles.

AI-generated description