Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit Special Cases and Transitions

Public visualization

Bowl of Fruit Special Cases and Transitions

0 stars0🌍 Public
RRobert Curtis
Last edited Nov 8, 2018
Created on Sep 13, 2018

A bowl of fruit renders apples and lemons as colored circles with labels, using d3 transitions to animate changes in a small dataset. Five apples appear initially, then one is removed, another swaps to a lemon, and a final apple disappears. The code uses `scaleOrdinal` for color and radius mapping, while `selection.enter`, `merge`, and `exit` handle state updates. SVG shapes and transitions with `.duration(1000)` smoothly shrink exiting circles and text, and reposition remaining fruit.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed