Skip to main content
Public

Share visualization

Loading preview…

15_Bowl of Fruit - click to select - Interactions with unidirectional dataflow

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

15_Bowl of Fruit - click to select - Interactions with unidirectional dataflow

0
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 description

Comments

Sign in to join the discussion.

MIT Licensed