{"version":"1.0","type":"rich","title":"Fork of Color and Size Legends","description":"This example demonstrates two types of legends using D3.js version 5.6.0, rendered as SVG elements. The first legend uses `scaleOrdinal` to map fruit names to colors, displayed as labeled circles. The second legend uses `scaleSqrt` to map a numeric domain to circle radii, with labeled tick marks. Both legends are created using custom reusable functions, `colorLegend` and `sizeLegend`, which manage the enter/update/exit lifecycle for the SVG groups, circles, and text elements.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/a9756490f1c94850a3ade96320d2e76d?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}