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)

39a17ef1584e4c5bacc78ad9f08193bc

Bowl of Fruit - General Update Pattern

0 stars2🌍 Public
Ggilbster
Last edited Dec 30, 2019
Created on Dec 27, 2019

A bowl of fruit demonstrates the general update pattern for data joins, animating circles in and out as the dataset changes. Apples and lemons render as colored circles using an ordinal color scale and an ordinal radius scale, with position determined by index. The example uses D3 v5 selections with `selection.data`, `enter` and `exit` transitions, and `merge` to handle updates. Three timed actions shift the data: removing an apple, swapping one apple for a lemon, and filtering out another fruit, each triggering a one-second transition on circle radius and x-coordinates.

AI-generated description