{"version":"1.0","type":"rich","title":"InteractionBasic","description":"This example shows a single SVG rectangle that changes color each time it is clicked. It demonstrates how to attach a basic interaction handler using D3’s `selection.on` method. The code loads D3 v6 from a CDN and renders the rectangle as inline SVG with a fixed size and position. Upon click, the rectangle’s fill is set to a random value from `d3.interpolateRainbow`, cycling through the color spectrum.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/75325587d411484fa462054af375b4aa?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}