Skip to main content
Public

Share visualization

Loading preview…

Fork of 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

Fork of Bowl of Fruit - Hover to Select

0
Jjlspangl
Last edited Sep 2, 2021
Created on Sep 2, 2021

A bowl of fruit rendered as five red apples animates as they are eaten and replaced by a lemon, while hovering over any fruit highlights it with a black outline. The example uses d3-selection’s data join and transitions to smoothly shrink and remove exiting circles, update fruit types, and re-render on mouseover and mouseout events. The fruit bowl is built with SVG circles, with colors and radii assigned via d3.scaleOrdinal, and state management handled through a custom render function in plain JavaScript.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed