Skip to main content
100%

Apples and Lemon with D3.js!

✓ Published1🌍 Public
LLidiamir
Last edited Mar 16, 2021
Created on Mar 16, 2021

A live D3.js visualization renders a bowl of fruit as five apples, which are then dynamically eaten or swapped for lemons over three seconds. The SVG scene uses `d3.scaleOrdinal` to map fruit types to specific radii and colors, with a red apple and yellow lemon. The `fruitBowl` function manages enter, update, and exit selections to add and remove circles and text labels for each piece of fruit, driven by a timer that mutates the data array and re-renders.

AI-generated description

Half way towards a smiley face. Smiley mark down (MD).

MIT Licensed

Similar vizzes