Skip to main content
100%

Bowl of Fruit - General Update Pattern

✓ Published1🌍 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.

MIT Licensed

Similar vizzes