🌍 Public
Viewing a saved revision (read-only)
b58218ed0a19436fa58b80e64d0f4135
bowl of fruit - general update pattern
Five circles represent apples that are added, removed, and change type in a bowl-of-fruit animation. Using D3.js v5’s data join, enter, merge, and exit selections, the example demonstrates the general update pattern with smooth 1000-millisecond transitions. Circles on mouseover highlight their stroke via a selected fruit state, while ordinal scales map fruit type to color and radius. The code shows enter-update-exit cycles through `setTimeout` calls that modify the fruits array.
AI-generated descriptionselect and