🌍 Public
Viewing a saved revision (read-only)
2d6e8396bf3448f0a069764c6be22e50
16_Bowl of Fruit - hover to select - Interactions with unidirectional dataflow
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 description