{"version":"1.0","type":"rich","title":"RS Color and Size Legends","description":"This example shows two reusable legend components for mapping data values to visual encodings. A color legend displays four ordinal fruit categories using distinct fills from d3.scaleOrdinal, while a size legend uses d3.scaleSqrt to encode numeric values as scaled circle radii. Both legends are built with D3 v5 selection joins, rendering SVG circles and text labels via custom enter/merge/exit patterns. The SVG output includes tick groups with styled text and semi-transparent circle strokes.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/5edfc802fd734b388bb32d1fb218d0af?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}