Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - General Update Pattern

Public visualization

Viewing a saved revision (read-only)

404d5a5a80874eeea8ae71f122d8390b

Bowl of Fruit - General Update Pattern

0 stars2🌍 Public
MMunTatt Yap
Last edited Aug 12, 2019
Created on Aug 2, 2019

A bowl of fruit demonstrates D3's general update pattern, showing apples as dark red circles and lemons as yellow ones with distinct radii. New fruit enter at radius zero and grow, existing fruit move horizontally and change fill when types change, and removed fruit shrink away. The example uses D3 v5 selections with `.data()`, `.enter()`, `.merge()`, and `.exit()`, applying transitions over one second to animate SVG circle attributes. A simple timeline triggers updates by popping apples, replacing one with a lemon, and filtering out another.

AI-generated description