{"version":"1.0","type":"rich","title":"Color and Size Legends","description":"This example demonstrates two types of chart legends rendered side-by-side as SVG. A color legend uses `d3.scaleOrdinal` to map fruit names to distinct colors, while a size legend uses `d3.scaleSqrt` to encode numeric values through circle radii. Both legends animate with `transition().duration()`, and the size legend filters out zero values from its ticks. Styling comes from CSS classes applied to the tick groups, with text and circles positioned dynamically.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/f8371b98305e484b97ef76f8053cfa47?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}