Skip to main content
100%

Bowl of Fruit

✓ Published1🌍 Public
YYifu Chen
Last edited Dec 27, 2019
Created on Dec 26, 2019

A bowl of fruit demonstrates animated data joins with D3.js. Five apples render as colored circles, then a sequence of timed transitions removes fruit, changes an apple into an orange, and filters another apple, showing enter, update, and exit selections. The code uses `scaleOrdinal` for color and size, `transition().duration()`, and custom `fruitBowl` and `render` functions, rendering SVG groups with circles and text labels. Data is generated randomly with `Math.random` IDs.

AI-generated description

Yifu's practice on making a smiley face with d3.js

Tutorial: https://www.youtube.com/watchv=_8V5o2UHG0E&t=1220s

Dec. 24, 2019

MIT Licensed

Similar vizzes