Bowl of Fruit - Clicking is life
A dynamic scatterplot visualizes fruit data as colored circles representing types—apple, lemon, melon—with size encoding type and color encoding category. Users click or hover over circles to select or highlight them, which updates stroke, opacity, and triggers animated transitions via d3.transition. The example uses d3.scaleOrdinal for color mapping and d3.selection with .merge for incremental updates, rendering through SVG. Data originates from an in-memory fruit array, with interactions managed by event handlers for click and mouseover.