Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of fruit - general update pattern (v2)

Public visualization

Viewing a saved revision (read-only)

f3bad7d06d084798ac9513c4ce8cc8da

Bowl of fruit - general update pattern (v2)

0 stars0🌍 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