Skip to main content
100%

Bowl of fruit just Enter & Exit

✓ Published1🌍 Public
Jjeelong
Last edited Jun 20, 2020
Created on Jun 20, 2020
Forked from Lets make a Map

A red circle represents each apple in a bowl of fruit. The visualization initially shows five apples in a horizontal row, then removes one after a one-second delay. The example demonstrates enter and exit animations using D3 v5's selection API, where `selectAll('circle').data(fruits)` handles the data binding, `.enter().append('circle')` creates the circles, and `.exit().remove()` deletes the departing apple. The React and D3 code is straightforward, relying on pre-defined SVG dimensions.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes