Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - General Update Pattern with Animation

Public visualization

Viewing a saved revision (read-only)

78f5441eec404ecb823bda55e427f55f

Bowl of Fruit - General Update Pattern with Animation

0 stars2🌍 Public
JJordan Chiu
Last edited Jan 27, 2020
Created on Jan 27, 2020

This example demonstrates the general update pattern for animating a data set over time. A row of five apples is shown as red circles that shrink to zero radius when removed and change into a yellow lemon when a type updates. The code uses D3 v5 with a custom `fruitBowl` function that separates enter, merge, and exit selections, applying `transition().duration(1000)` to animate the radius and x-position of the circles.

AI-generated description

Tutorial!