Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bowl of Fruit - General Update Pattern Special Cases

Public visualization

Bowl of Fruit - General Update Pattern Special Cases

0 stars0🌍 Public
MMihir Sawant
Last edited Apr 8, 2019
Created on Sep 18, 2018

This example demonstrates the general update pattern for adding, removing, and modifying data in a D3 visualization, using a bowl of fruit. It shows how entering, updated, and exiting elements are handled when the data changes over time. The code uses d3.select, d3.range, and custom scales from d3.scaleOrdinal to map fruit types to colors and radii. SVG circles and text labels are updated with transitions, including a sequence of font-size changes, while the fruit data is modified via pop and filter operations.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed