Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - General Update Pattern Special Cases

Public visualization

Viewing a saved revision (read-only)

9745f1d17876440c93d31327b1469c10

Bowl of Fruit - General Update Pattern Special Cases

0 stars0🌍 Public
Ccharliemok
Last edited Feb 8, 2021
Created on Feb 8, 2021

A bowl of fruit visualizes the general update pattern with special cases. It shows apples and lemons as colored circles in a fixed bowl, with each fruit's type label beneath it. The code uses D3 v5's `scaleOrdinal` for color and radius scales, then applies the update pattern via `selection.selectAll` and `.merge` to handle entering, updating, and exiting elements. SVG rendering positions fruits horizontally, with a static rect forming the bowl.

AI-generated description