Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - Click to select

Public visualization

Bowl of Fruit - Click to select

0 stars1🌍 Public
SSimon Pettersson
Last edited Jan 30, 2022
Created on Jan 30, 2022

This example presents a bowl of fruit where apples and lemons animate their size and color as the dataset updates. A user can click any fruit to select it, which adds a black stroke. The D3 v5 code uses `scaleOrdinal` for color and radius mappings, and applies transitions to smoothly animate entering, exiting, and resizing circles. Array mutations (removing or altering fruit) trigger re-renders, demonstrating dynamic data binding with click-driven selection.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed