{"version":"1.0","type":"rich","title":"Color Legend","description":"A categorical color legend maps fruit names to colored circles using an ordinal scale. The legend renders as a vertical list of four circles, each paired with a text label, with spacing controlled by a parameter. The code uses d3.scaleOrdinal and d3-selection to bind data to SVG groups, appending circles and text elements. The colorLegend function is invoked via selection.call, with the legend positioned by an SVG transform.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/115101400ba14bcfb241c9c24a68549f?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}