Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Bowl of Fruit - General Update Pattern Special Cases

Public visualization

Fork of Bowl of Fruit - General Update Pattern Special Cases

0 stars0🌍 Public
Rrajeshathakur
Last edited Apr 15, 2021
Created on Apr 15, 2021

This example demonstrates the general update pattern for SVG elements, showing how a fruit bowl changes over time with apples and lemons added and removed. A JavaScript array acts as the data source, modified through pop, assignment, and filter operations. Using functions from `d3` including `select`, `range`, and custom `fruitBowl` logic with `scaleOrdinal` for colors and radii, the view updates render enter, update, and exit states on circles and text labels. The visualization relies on D3 v5’s selection merging and exit removal to reflect data changes.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed