🌍 Public
Viewing a saved revision (read-only)
16d5d5db77be4400a063d02e1cd516aa
fruit bowl - general update pattern
Five apples in a row transition through enter, update, and exit phases as fruits are removed or change to lemons. D3’s general update pattern binds circle elements to a data array using unique IDs, while `scaleOrdinal` maps fruit types to colors and radii. Mouseover and mouseout events set a selected state that highlights circles with a black stroke. Transitions lasting one second animate circle radius and horizontal position, with exiting elements shrinking to zero before removal.
AI-generated description