Dynamic Rendering
This example demonstrates dynamic rendering of a fruit bowl visualization, where circles represent fruits that appear, disappear, and change type over time. The code uses D3 v5 with ES6 modules to manage the enter, update, and exit selections, animating radius changes via transitions. A color scale and radius scale map fruit types to visual properties, with click events triggering a selection state. The animation sequence removes apples, replaces one with a lemon, and filters out another, showcasing data-driven updates.