15_Bowl of Fruit - click to select - Interactions with unidirectional dataflow
✓ Published0🌍 Public
NNeepaB
Last edited Dec 19, 2020
Created on Dec 19, 2020
This example demonstrates interactive selection within a small SVG scene of colored circles. The D3.js program uses a unidirectional dataflow, where a selected fruit's ID is passed to a click handler that updates the program state before re-rendering. Animated transitions using `transition.duration()` grow new fruit circles upon entry, shrink them on exit, and apply a black stroke to the currently selected fruit. The visualization also reacts to timers that remove or modify fruit items.
AI-generated descriptionMIT Licensed