🌍 Public
Viewing a saved revision (read-only)
6195b41c169e45f7a6414f71e8bd2ba3
Fork of haha
Five apples appear in a bowl, then the example animates a series of changes: one apple is removed, a second apple turns into a lemon, another apple disappears, and a third becomes a lemon. Each fruit is an SVG circle, with color and size determined by a `scaleOrdinal` color scale and radius scale. The D3 code uses `select` for DOM selection, `.transition()` with a one-second duration to animate attribute changes, and mouseover/mouseout events that call `onClick` to highlight the selected fruit with a yellow stroke.
AI-generated description