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

0
PPhilRG
Last edited May 15, 2020
Created on May 15, 2020

Five apples rendered as red circles sit in a row within an SVG, and clicking any of them selects it, adding a black outline. The React component uses D3’s `scaleOrdinal` for color and radius mappings, with state managed via `useState` to track the selected fruit. Rendering is direct SVG circle generation, driven by the `FruitBowl` component. The code includes commented-out D3 transitions for potential future animation.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed