Nested elements with transitions (exercise)
✓ Published0🌍 Public
A row of apples is rendered as nested SVG circles and text labels. Over time, the sequence changes through timed simulation events: an apple is removed, another is replaced with a lemon, and a third apple is deleted. The example demonstrates d3's `select` and `merge` API for updating nested elements, with a `transition().duration(1000)` animating the circle fill and radius changes according to the fruit type, while text labels update instantly.
AI-generated descriptionMIT Licensed