{"version":"1.0","type":"rich","title":"Colour and Size Legends","description":"This example demonstrates two kinds of legends side by side: a color legend mapping ordinal categories to distinct hues, and a size legend using a square-root scale to encode quantitative values. Both legends animate their circle radii over one second using D3’s `transition`. The code uses `d3.scaleOrdinal`, `d3.scaleSqrt`, `selection.call`, and React is loaded for the framework, while all rendering is done via SVG. The size legend uses `sizeScale.ticks` to generate labeled values, excluding zero.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/cb212254453b41af9b51a3285c837a3e?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}