Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Apples and Lemon with D3.js!

Public visualization

Viewing a saved revision (read-only)

2f89110173ce4033aa498c03c25c4cef

Apples and Lemon with D3.js!

0 stars1🌍 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).