Skip to main content
100%

Bowl of fruit - Hover to select

✓ Published0🌍 Public
NNkwachi Abel
Last edited May 29, 2022
Created on May 29, 2022

This visualization shows a dynamic fruit bowl that updates through a timed sequence: apples disappear, one apple transforms into a lemon, and another apple is removed. Hovering over any fruit circle selects it, highlighting the chosen item with a black stroke. Built with React and D3 v5, the `fruitbowl.js` component uses `scaleOrdinal` for color and radius mapping, while the selection logic relies on `mouseover` and `mouseout` events. Animated transitions via `transition().duration(1000)` smoothly resize circles, and the underlying data is a simple array of fruit objects with random IDs, rendered as SVG circles.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes