Bowl of Fruit - General Update Pattern
✓ Published0🌍 Public
Five circles representing fruit enter an SVG with zero radius and grow into apples. The example demonstrates D3’s general update pattern, animating exits by shrinking circles to zero and modifying existing fruits via the data join. Using `d3.scaleOrdinal` for color and radius, it transitions enter, update, and exit selections over one second. Hovering highlights a circle with a black stroke via mouse events. Over three seconds, `setTimeout` removes a fruit, changes a type to lemon, and filters another element, showing joins and transitions.
AI-generated descriptionMIT Licensed