Skip to main content
100%

Nested Elements

✓ Published0🌍 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.

MIT Licensed

Similar vizzes