Bowl of Fruit, Highlight on Hover
✓ Published0🌍 Public
Five pieces of fruit sit in a row, rendered as scaled SVG circles. Hovering over an apple or lemon highlights it with a black outline, while a click sets a selection that persists. The bowl updates dynamically: apples are removed, and one apple’s type changes to a lemon, with a 1000-millisecond transition animating the radius change. Built with d3 v5’s `select`, `scaleOrdinal`, and `transition`, it uses `mouseover` and `mouseout` events to trigger a state change and re-render.
AI-generated descriptionGeneral Update Pattern
MIT Licensed