Skip to main content
100%

16_Bowl of Fruit - hover to select - Interactions with unidirectional dataflow

✓ Published0🌍 Public

This example demonstrates a bowl of fruit where hovering over a circle highlights it with a black stroke, using d3’s `select`, `range`, `scaleOrdinal`, and `.transition()` for animation. Rendered as SVG, the visualization reacts to mouseover and mouseout events, updating the `selectedFruit` state and redrawing circles with changing radii and colors. Data mutations (e.g., removing or replacing fruits) occur via timed `setTimeout` calls, driving a unidirectional dataflow that re-renders the scene.

AI-generated description
MIT Licensed

Similar vizzes