Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - General Update Pattern

Public visualization

Bowl of Fruit - General Update Pattern

0 stars1🌍 Public
Ddaigokawabe
Last edited Aug 1, 2020
Created on Jul 31, 2020

This example demonstrates the general update pattern in D3 for animating a dynamic dataset of fruits. It shows a bowl of apples and lemons as circles, where fruits are added, removed, or changed over time. The visualization uses D3's `transition` API to animate radius changes on enter, update, and exit, with `scaleOrdinal` mapping fruit types to colors and sizes. The React-based code mutates an array and re-renders, showing how the `merge` and `remove` operations handle state transitions fluidly.

AI-generated description

A bare minimum HTML page.

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed