Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Fork of Bowl of fruit - with click events

Public visualization

Fork of Fork of Bowl of fruit - with click events

0 stars1🌍 Public
Cceresfin
Last edited Jan 31, 2021
Created on Jan 31, 2021

A bowl of five apples animates through a sequence of changes: one fruit disappears, another transforms into a lemon, and a third is removed. Clicking any fruit selects it, highlighting its outline in black. The example demonstrates reusable data joins with `d3.selectAll`, `enter`/`merge`/`exit` selections, and ordinal scales for mapping fruit type to color and radius. Smooth transitions are applied via `transition().duration()`, animating circle position and radius over one second.

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