{"version":"1.0","type":"rich","title":"Color and Size Legends","description":"This example demonstrates two reusable legend components for D3 visualizations: a color legend using an ordinal scale to map named categories to distinct colors, and a size legend using a square-root scale to encode numeric values through circle radius. The legends render as SVG groups with circles and labels, using d3.scaleOrdinal and d3.scaleSqrt. Both components employ the enter/merge/exit pattern to update efficiently, with a video link provided in the README.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/ea3138b3c18045b9a09d5b2d38df236e?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}