🌍 Public
Viewing a saved revision (read-only)
036b73f3303b42cf9dbf805198a80f68
Bowl of Fruit - Click to Select
Five fruit circles appear in a row, rendered as SVG elements colored by fruit type via a `scaleOrdinal` color scale, with apples in red and lemons in yellow. Clicking a circle logs its ID, while pre-scripted `setTimeout` calls dynamically remove circles, change an apple to a lemon, and filter the data array, triggering animated `transition` updates that shrink exiting circles to radius zero. The example uses D3 v7's data join pattern with `selection.enter`, `merge`, and `exit` to sync the visualization with changing data, initializing new circles at radius zero before animating them to their target sizes.
AI-generated description