{"version":"1.0","type":"rich","title":"Color and Size Legends","description":"The example shows two legends for mapping data to visual encodings: one for color using ordinal categories and one for size using a square-root scale. It renders SVG elements via D3 v5, with the color legend displaying discrete fruit names mapped to distinct hues, while the size legend displays a reversed set of numeric ticks with proportional circle radii. Reusable functions `colorLengend` and `sizeLengend` manage enter, update, and exit selections for the legends.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/8ea88e6332e54a2a9cc7c3332f7f4f42?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}