16_Bowl of Fruit - hover to select - Interactions with unidirectional dataflow
✓ Published0🌍 Public
FFMajid-ops
Last edited Dec 18, 2020
Created on Dec 18, 2020
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 descriptionMIT Licensed