Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - General Update Pattern w/ Events

Public visualization

Viewing a saved revision (read-only)

90172d8b2e854a0a8fd46b2e57e257a8

Bowl of Fruit - General Update Pattern w/ Events

0 stars0🌍 Public
Eegrebing
Last edited Sep 26, 2020
Created on Sep 26, 2020

This example demonstrates the general update pattern with event handling using D3 v6, rendering a row of fruit as colored circles with labels inside an SVG bowl. Apples and lemons are distinguished by color and size through ordinal scales, while clicks and mouseovers log the fruit type. The code explicitly manages enter, update, and exit selections, using `selection.merge()` for nested circle and text elements, and triggers timed state changes that add, remove, or replace fruits to show dynamic transitions.

AI-generated description

An example including some commonly used features of SVG.