Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruits: General Update Pattern

Public visualization

Bowl of Fruits: General Update Pattern

0 stars2🌍 Public
Ppeterjchan
Last edited Mar 30, 2020
Created on Mar 30, 2020

This example demonstrates the general update pattern in D3 v5 by animating a bowl of fruit through data joins. It shows how entering, updating, and exiting selections are handled as apples are removed, replaced with lemons, and filtered over timed intervals. The visualization uses `selection.data()`, `selection.enter()`, `selection.exit()`, and `transition()` to smoothly move and resize fruit circles and labels. SVG elements are rendered with ordinal scales for color and radius, while the bowl itself is a static rectangle.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed