Bowl of Fruit: Nested Elements with Transitions
✓ Published1🌍 Public
Five apples enter a bowl as circles with a smooth transition, then shrink and disappear as the fruit is eaten, while one apple turns into a lemon and changes color and size. The d3.v5 code uses a data join with enter, update, and exit selections, nesting circles and text inside groups. Transitions animate radius changes, and exit transitions shrink circles before removal, with scaleOrdinal mapping fruit types to colors and radii.
AI-generated descriptionD3 course follow along.
MIT Licensed