Bowl of Fruit
✓ Published0🌍 Public
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 descriptionYifu's practice on making a fruit bowl with d3.js
Tutorial: https://www.youtube.com/watchv=_8V5o2UHG0E&t=1220s
Dec. 24, 2019
MIT Licensed