Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fruit bowl

Public visualization

Viewing a saved revision (read-only)

2525a3e34203473fa04ac352a55ec987

Fruit bowl

0 stars0🌍 Public
GGlenn Henshaw
Last edited Sep 27, 2019
Created on Sep 27, 2019
Forked from graph2.js!

A fruit bowl demonstrates incremental updates to SVG circles using D3.js v5. Five apples first render as a row of red circles, then one apple is removed, and a later change turns one remaining fruit yellow. The code uses D3's `select`, `range`, and `scaleOrdinal` APIs, with explicit enter, merge, and exit selections to manage the changing dataset.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.