Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - Click to Select

Public visualization

Viewing a saved revision (read-only)

12d99f9bc9f744d98db8422b4ef04477

Bowl of Fruit - Click to Select

0 stars1🌍 Public
AArriannePandaraoan
Last edited Apr 21, 2020
Created on Apr 21, 2020

A bowl of fruit demonstrates D3.js data joins and interactive selection. Five apples render as circles that transition in size and position over time, with one apple morphing into a lemon and others disappearing. Clicking any fruit highlights it with a black stroke. The code uses `selection.data`, `enter`, `merge`, and `exit` with `transition.attr` to animate SVG circles, plus `scaleOrdinal` for color and radius mappings.

AI-generated description

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