🌍 Public
Viewing a saved revision (read-only)
6c1e84bbe2244f0eb1b25ffa21e94e1f
Let's make a face with D3.js!
A sequence of animated circles demonstrates the D3.js transition API as five apples shrink, disappear, and transform into a lemon over four seconds. The example uses `d3.select`, `d3.range`, and a custom `fruitBowl` module with `selection.transition().duration(1000)` to smoothly interpolate circle radii, x-positions, and fill colors. Data modifications—removing array elements and changing a fruit type—trigger re-renders, while `d3.scaleOrdinal` maps fruit types to colors and radii. The SVG output is updated incrementally at one-second intervals.
AI-generated description