Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - Singular Elements

Public visualization

Bowl of Fruit - Singular Elements

0 stars0🌍 Public
CChristine Lanser
Last edited Oct 6, 2020
Created on Oct 6, 2020

A bowl of fruit demonstrates the enter, update, and exit pattern for SVG elements. The chart shows five apples that are then eaten, replaced with a lemon, and removed one by one over time. Using d3.scaleOrdinal for color and radius, d3-selection's merge and exit methods update the circles and text labels. The visualization uses SVG rect for the bowl and groups for each fruit, with a custom fruitBowl function managing data joins.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed