Bowl of Fruits - Click to Select
✓ Published0🌍 Public
A bowl of fruit displays apples and lemons as colored circles, with the currently selected fruit highlighted by a black outline. Clicking any fruit triggers a transition that animates its radius and position, while removed fruits shrink and exit. The example uses D3 v5’s data joins with `selection.enter`, `merge`, and `exit` methods, alongside `scaleOrdinal` for color and size, and `transition.duration` for smooth animations. The `fruitBowl.js` module manages the interactive selection logic, while `index.html` loads the SVG container and D3 bundle.
AI-generated descriptionDemonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.
MIT Licensed