Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Nested Elements

Public visualization

Viewing a saved revision (read-only)

a760394b49a446cc9e5e6eae9a269093

Nested Elements

0 stars0🌍 Public
AAnnie Liao
Last edited Jul 2, 2020
Created on Jun 17, 2020

A fruit bowl rendered in SVG shows a row of apples and a lemon, with each fruit as a circle inside a rounded rectangle. D3’s `scaleOrdinal` maps fruit types to circle radii and fill colors, while `merge` and `transition().duration(1000)` animate changes to the fruit data. Over three seconds, the visualization removes an apple, swaps an apple for a lemon, and deletes another apple, demonstrating how D3’s selection API handles nested elements and dynamic updates.

AI-generated description

A bare minimum HTML page.

See also React Starter.