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
Jjlspangl
Last edited Sep 2, 2021
Created on Sep 2, 2021

A dynamic SVG shows a bowl of fruit where apples and lemons animate in and out as data updates. Clicking any fruit selects it, highlighting it with a black stroke. The code uses d3.scaleOrdinal for color and radius mappings, with d3 transitions animating circle positions and radii over one second. Predefined setTimeout events remove apples, mutate one apple into a lemon, and filter out another fruit to demonstrate enter, update, and exit selections.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed