Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - Click to Select

Public visualization

Viewing a saved revision (read-only)

8bf4bd787d17493c922812a4907e129a

Bowl of Fruit - Click to Select

0 stars1🌍 Public
Ssiddharth171
Last edited Jul 25, 2020
Created on Jul 25, 2020

A bowl of fruit demonstrates a data join pattern with D3 v5, showing how a list of apples and lemons responds to changes over time. Five apples appear in a rendered bowl, then a fruit is removed, one apple changes to a lemon, and another apple disappears. The `fruitBowl` function uses `scaleOrdinal` for color and radius, while `selection.data`, `enter`, `merge`, and `exit` manage SVG `g`, `circle`, and `text` elements, updating positions with `attr('transform')` and `transition`.

AI-generated description