Skip to main content
100%

Bowl of Fruit - General Update Pattern

✓ Published3🌍 Public
JJake
Last edited Jun 20, 2020
Created on Jun 17, 2020
Forked from Hello VizHub

This example demonstrates the D3 general update pattern for dynamic data visualizations. It renders a bowl of fruit as circles in an SVG, with apples colored red and lemons yellow, using `scaleOrdinal` for both color and radius mappings. The `fruitBowl` function applies the enter, update, and exit selections through chained `.enter()`, `.merge()`, and `.exit()` calls. Timed `setTimeout` events trigger data mutations—removing fruits, changing an apple to a lemon, and filtering elements—which are then handled by the update pattern in the React-based application.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes