Skip to main content
100%

Bowl of fruit - general update pattern (v2)

✓ Published0🌍 Public
NNathan Neelis
Last edited Nov 6, 2020
Created on Nov 6, 2020

A bowl of fruit demonstrates the general update pattern, showing how a D3 visualization reacts to changing data over time. Apples are rendered as dark red circles of radius 50, while lemons are yellow circles of radius 30, positioned within a rounded-rectangle bowl. The code uses `d3.select`, `d3.range`, and `d3.scaleOrdinal` from D3 v5, with SVG output. Through `selection.enter`, `.merge`, and `.exit` methods, the example sequentially removes apples, replaces one with a lemon, and filters another, updating the visualization accordingly.

AI-generated description
MIT Licensed

Similar vizzes