🌍 Public
Viewing a saved revision (read-only)
70add0ebf44a47afab6fb8bc35e84996
Nested elements with transitions (exercise)
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 description