{"version":"1.0","type":"rich","title":"Color and Size Legends","description":"This example demonstrates how to construct separate legends for color and size encodings. The color legend maps ordinal data categories to distinct hues, while the size legend translates a continuous quantitative scale into proportional circle radii. Both legends are rendered as SVG groups using D3 v5, with the ordinal color scale and square-root size scale defined via `scaleOrdinal` and `scaleSqrt`. The legends are drawn through custom `colorLegend` and `sizeLegend` functions, which manage tick marks with circles and text labels.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/6528835e178e4559923945058e82da86?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}