Skip to main content
100%

Let's make a face with D3.js!

✓ Published2🌍 Public
Ccpsshan
Last edited Jul 15, 2019
Created on Jul 15, 2019

A dynamic SVG scene of fruit circles arranges as a face-like bowl, with apples and lemons changing position, size, and color through animated transitions. Using D3 v5’s `scaleOrdinal` for color and radius mapping, the example demonstrates data joins with `enter`, `merge`, and `exit` selections, applying `transition().duration(1000)` to animate circle attributes. Clicking a circle highlights it with a black stroke via a `selectedFruit` callback. Over time, `setTimeout` removes fruits and mutates one apple into a lemon, showcasing live updates.

AI-generated description
MIT Licensed

Similar vizzes