Bowlfruit to select
✓ Published0🌍 Public
Five fruits in a bowl transition between apples and lemons, with a black outline highlighting whichever fruit the pointer hovers over. The visualization demonstrates animated enter, update, and exit selections using D3 v5’s data join, transitioning circle radii from zero and updating positions via `transition().duration(1000)`. Mouseover and mouseout events trigger a state change through a `setSelectedFruit` callback, which re-renders the SVG with updated stroke styling. The code uses `d3.scaleOrdinal` for color and radius mappings, and `d3.range` to generate the initial dataset.
AI-generated descriptionMIT Licensed