Skip to main content
100%

Bowl of Fruit - hover to select

✓ Published1🌍 Public
NNaveenaS12
Last edited Aug 11, 2020
Created on Aug 10, 2020

A row of fruit circles appears, initially five red apples, and the user can hover over any fruit to select it, which highlights it with a black stroke. The visualization demonstrates animated updates to a data join: one apple is removed, a second apple changes into a lemon, and a third fruit is filtered out, all with smooth transitions using D3 v5’s `transition().duration(1000)`. The code uses `d3.scaleOrdinal` for color and radius, and `selection.data` with a key function, along with `mouseover` and `mouseout` event handlers to manage selection state.

AI-generated description
MIT Licensed

Similar vizzes