{"version":"1.0","type":"rich","title":"General Update Pattern (Hovering Events)","description":"This example demonstrates the general update pattern in D3, where a sequence of timed data mutations—removing, replacing, and filtering fruits—animates circles smoothly in and out of an SVG. Hovering a circle selects it, triggering a black outline via a `mouseover` and `mouseout` event handler that updates a `selectedFruit` variable. The code uses `d3.select`, `scaleOrdinal` for colors and radii, and chained `transition().duration()` calls to animate enter, update, and exit selections. The fruit bowl renders as red apples and yellow lemons on a fixed-height SVG canvas.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/3ab7793c924a4defae933cfc1d90f3c4?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}