updatePattern
This example demonstrates the D3 update pattern for smoothly transitioning between data states in an SVG visualization. It shows five fruit circles that change over time through timed intervals: removing an apple, changing an apple to a lemon, and filtering out another apple. The code uses d3.scaleOrdinal to map fruit types to colors and radii, while d3.transition animates circle attributes over one-second durations. The enter, merge, and exit selections handle new, updating, and removed elements respectively, with exiting circles shrinking to zero radius before removal.