Skip to main content
100%

Let's make a face with D3.js!

✓ Published1🌍 Public
Eemntd
Last edited Oct 18, 2019
Created on Oct 17, 2019

A bowl of fruit rendered as SVG circles demonstrates data joins with D3.js. The code uses `d3.scaleOrdinal` for color and radius, binding an array of fruit objects to `circle` elements via `selection.data`. After one second, `fruits.pop()` removes the last apple, triggering an exit transition; after two seconds, the third fruit’s type changes to lemon, updating its fill and size. The examples uses `selection.enter`, `merge`, and `exit` patterns to handle updates.

AI-generated description
MIT Licensed

Similar vizzes