Skip to main content
Public

Share visualization

Loading preview…

Bowl of Fruit - Click to Select

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

Bowl of Fruit - Click to Select

1
Aarths-glitch
Last edited May 31, 2020
Created on May 23, 2020

Five apples render as red circles in an SVG bowl, with yellow lemon circles appearing when an apple’s type changes. Hovering toggles a black stroke on the selected fruit, while timed updates remove and replace circles. The code uses `d3.scaleOrdinal` for colors, radii, and stroke states, with `selection.merge` and `transition.attr` animating enter, update, and exit circles. Data is generated randomly via `Math.random`, and interactions trigger `onClick` callbacks.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed