Skip to main content
100%

Bowl Fruits General Updates Pattern

✓ Published1🌍 Public
SShabani Muswamba
Last edited Apr 20, 2020
Created on Apr 19, 2020
Forked from Framework

This example demonstrates the General Update Pattern in D3 v5, showing how a bowl of fruits—apples and lemons—changes over time through enter, update, and exit selections. Circles animate in with a radius transition, update their fill color and size based on fruit type, and animate out when removed. The `d3.scaleOrdinal` maps fruit types to colors and radii, while mouseover and mouseout events highlight the selected fruit with a teal stroke via `setSelectedFruit`. Animated transitions use `transition().duration()` with SVG circles.

AI-generated description

The Fruits Bowl animation.

MIT Licensed

Similar vizzes