Hover to select
✓ Published0🌍 Public
Five fruit circles of varying radius and color represent apples and a lemon, ordered in a row. Hovering over a circle triggers a `mouseover` event that calls `setSelectedFruit`, updating a black stroke on the active fruit, which clears on `mouseout`. Using d3 v5 with a module-based `fruitBowl` function, it binds data via `selection.data`, merges enter/update selections, and uses `scaleOrdinal` for mapping type to size and color. The SVG renders in a fixed 960×500 viewport, with dynamic updates as fruits are removed or replaced.
AI-generated descriptionMIT Licensed