{"version":"1.0","type":"rich","title":"Selection Join","description":"This example demonstrates D3’s selection join by rendering a row of red circles that appear and disappear as users click the “Add Data” and “Remove Data” buttons. The circles are generated from a small array of fruit objects, which the buttons mutate by pushing or popping elements before re-rendering. The code uses `selectAll` with `data` and the `join` method to bind the array to SVG circle elements, updating positions via `attr`. It relies on `d3.select` and `d3.range`, with SVG output. The color is overridden to none, leaving black-outlined circles.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/6267cf6adc5d4ca596389768936d4267?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}