Skip to main content
100%

Bowl of Fruit - Hover to Select

✓ Published0🌍 Public
Eegrebing
Last edited Sep 28, 2020
Created on Sep 28, 2020

This example demonstrates a data join with smooth SVG transitions as a bowl of fruit updates over time. Circles representing apples and lemons enter, exit, and change type, with color and radius mapped through `d3.scaleOrdinal`. Hovering highlights a fruit by updating a `selectedFruit` state, which triggers a re-render via `fruitBowl`. The code uses `selection.merge`, `transition.attr`, and mouse event listeners within a D3 v6 module.

AI-generated description

An example including some commonly used features of SVG.

MIT Licensed

Similar vizzes