FruitBowl Example
✓ Published1🌍 Public
This example shows a bowl of fruit rendered as SVG circles with a steelBlue bowl, where apples and lemons are distinguished by color (red vs. yellow) and radius (50 vs. 30). The fruits are placed horizontally using a computed x-position and animated over time: a fruit is removed after one second, an apple turns into a lemon after two seconds, and another fruit is filtered out after three seconds. The code uses the d3.v5 select API for DOM selection, scaleOrdinal for color and radius mapping, and merge/exit operations from the d3 data-join pattern to handle incremental updates to the scene.
AI-generated descriptionMIT Licensed