Skip to main content
Public

Share visualization

Loading preview…

Bowl of Fruit Hover 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 Hover to Select

0
KKarkG
Last edited Jul 30, 2020
Created on Jul 29, 2020
Forked from Bowl of Fruit

Five circles represent fruit in a bowl, initially all apples. Hovering over a circle selects it, shown by a thick black outline. The selection triggers a function to update the view. The code uses a custom `fruitBowl` function with `selectAll`, data joins for enter/update/exit, and animated transitions for radius and x-position. Over time, an apple is removed, another apple changes into a lemon, and a second apple is removed, demonstrating dynamic updates to a D3.js visualization.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

Comments

Sign in to join the discussion.

MIT Licensed