Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of fruit - general update pattern

Public visualization

Viewing a saved revision (read-only)

a5683a35339e4b30bd899e49ad4ace8e

Bowl of fruit - general update pattern

0 stars1🌍 Public
JJason-Manbodh
Last edited May 26, 2020
Created on May 25, 2020

Five apples appear as red circles in an SVG, arranged horizontally above a bowl. Following a timed script, the visualization removes an apple, changes an apple to a yellow lemon, and removes another, demonstrating D3’s general update pattern. The code uses `selection.selectAll`, `.enter()`, `.merge()`, and `.exit()` with a `transition().duration(1000)` to animate radius and x-position changes, while `scaleOrdinal` maps fruit types to colors and sizes.

AI-generated description