Bowl of Fruit - Hower to Select
✓ Published0🌍 Public
A bowl of fruit demonstrates interactive selection and data updates. Apples and lemons appear as colored circles, with a black outline highlighting the fruit under the mouse. The example uses D3 v5 with a `scaleOrdinal` for colors and radii, and `transition().duration()` for smooth enter, update, and exit animations. The data is simulated client-side with `Math.random()` IDs, and selection changes trigger a re-render via `setSelectedFruit`. Apples are removed and a lemon replaces one apple over time, showing live updates.
AI-generated descriptionMIT Licensed