Skip to main content
100%

Bowl of fruit - Nested

✓ Published1🌍 Public
NNkwachi Abel
Last edited May 25, 2022
Created on May 25, 2022

This example demonstrates a nested data visualization of a fruit bowl, where circles and labels are bound to an array of fruit objects in SVG. It shows five apples that are sequentially removed or replaced with a lemon over timed intervals, highlighting layout updates. The code uses D3 v5’s `scaleOrdinal` for color and radius mapping, SVG `g`, `circle`, and `text` elements, plus React-style enter/merge/exit patterns via `selection.enter()`, `selection.merge()`, and `selection.exit()`. A static `rect` renders the bowl container.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes