Skip to main content
100%

Fork of Bowl of Fruit - General Update Pattern Special Cases

✓ Published0🌍 Public
MMouad Et-tali
Last edited Nov 7, 2022
Created on Nov 7, 2022

This example demonstrates the general update pattern in D3 v5, showing how a static visualization changes over time as a fruit bowl is modified. It renders a bowl of apples and a lemon as SVG circles and text labels, with a fixed background rect. The code uses `d3.select`, `d3.range`, and custom `scaleOrdinal` scales for color and radius, while the `fruitBowl` function handles enter, update, and exit transitions. The sequence removes an apple, changes one to a lemon, and filters out another, each triggered by a `setTimeout`.

AI-generated description
MIT Licensed

Similar vizzes