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

2
KKurt J Nilsen
Last edited Aug 3, 2020
Created on Aug 2, 2020

This example shows a bowl of fruit that changes over time, with circles representing apples and lemons that users can click to select, highlighting the chosen fruit with a black outline. The visualization demonstrates animated transitions as fruits are removed, transformed, and repositioned using d3 transitions over one second. Built with React and d3.v5, the code uses `scaleOrdinal` for color and radius mapping, while selection and data binding manage the dynamic updates. The SVG rendering includes click handlers that trigger re-renders, and the fruit bowl shrinks and morphs as fruits disappear from the array.

AI-generated description

A bare minimum HTML page.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed