🌍 Public
Viewing a saved revision (read-only)
390dd2b43e78428a8dd0ad788670ecd8
bowl of fruit
A bowl of fruit demonstrates animated data joins with D3 using ordinal scales to map fruit types to colors and radii. Apples appear as red circles, lemons as yellow ones, with text labels below each shape. The visualization uses `selection.data()` with a key function to track fruit identities, then applies enter, update, and exit selections as fruits are removed or changed over timed intervals. The code employs `scaleOrdinal`, `range`, and SVG rendering with `attr` and `merge` operations.
AI-generated descriptionA demonstration of how to start using D3 version 6.