Skip to main content
100%

Bowl of Fruit

✓ Published0🌍 Public
YYifu Chen
Last edited Dec 27, 2019
Created on Dec 26, 2019
Forked from Bowl of Fruit

This example demonstrates a simple data-driven fruit bowl visualization where apples and oranges are rendered as colored circles with text labels. The code uses d3.scaleOrdinal to map fruit types to colors and sizes, with SVG circles and text elements animated through D3’s enter/update/exit pattern. A timed sequence of snack events (eating an apple or swapping one for an orange) triggers re-renders. The implementation imports specific functions like scaleOrdinal and range from d3, with the fruitBowl module handling the selection joins.

AI-generated description

Yifu's practice on making a fruit bowl with d3.js

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

Dec. 24, 2019

MIT Licensed

Similar vizzes