Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - Click event

Public visualization

Bowl of Fruit - Click event

0 stars1🌍 Public
Rrintisch
Last edited Oct 22, 2019
Created on Oct 22, 2019

A bowl of five apples is rendered as SVG circles, with click events selecting a fruit and highlighting it with a black stroke. The data-bind updates smoothly through animated transitions: apples shrink and disappear when eaten, and the third apple morphs into a lemon with a color and size change. Using d3-v5, the code employs scaleOrdinal for color and radius mapping, selection.merge for updating, and transition().duration() to animate enter, update, and exit states.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed