{"version":"1.0","type":"rich","title":"Shapes and Colors with SVG and CSS","description":"This example demonstrates two custom SVG legends rendered side by side: a color legend for ordinal categories and a size legend for quantitative values. The color legend uses `d3.scaleOrdinal` with distinct fruit categories, while the size legend employs `d3.scaleSqrt` to map numeric ticks to circle radii. Both legends are built using reusable functions that leverage D3’s data join pattern (`enter`, `merge`, `exit`) and are styled with CSS classes. The SVG output is rendered directly in the browser via D3 v5.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/22b872c02e7248b59e5e323d51f34c0a?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}