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
JJordan Chiu
Last edited Jan 27, 2020
Created on Jan 27, 2020

Five pieces of fruit sit in an animated bowl, rendered as circles whose radius and fill come from d3.scaleOrdinal based on fruit type. Clicking an apple or lemon triggers an onClick handler that sets the selected fruit, which receives a thick black stroke via a data join and transition. The example also demonstrates enter, update, and exit selections by removing apples and changing one apple to a lemon at timed intervals, all using d3.transition for smooth radius and position animations.

AI-generated description

Tutorial!

Comments

Sign in to join the discussion.

MIT Licensed