Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit: Nested Elements with Transitions

Public visualization

Bowl of Fruit: Nested Elements with Transitions

0 stars1🌍 Public
Bbprokopowicz
Last edited Mar 30, 2020
Created on Mar 30, 2020

Five apples enter a bowl as circles with a smooth transition, then shrink and disappear as the fruit is eaten, while one apple turns into a lemon and changes color and size. The d3.v5 code uses a data join with enter, update, and exit selections, nesting circles and text inside groups. Transitions animate radius changes, and exit transitions shrink circles before removal, with scaleOrdinal mapping fruit types to colors and radii.

AI-generated description

D3 course follow along.

Comments

Sign in to join the discussion.

MIT Licensed