{"version":"1.0","type":"rich","title":"Fork of Color and Size Legends - Component Experiment","description":"This example shows two legends rendered side-by-side in an SVG: one for ordinal color scales and one for square-root size scales. The color legend maps fruit categories to distinct fills, while the size legend displays circular marks scaled by numeric tick values. Both legends are built as reusable component functions that receive parameters via `Object.assign` properties, following the “Towards Reusable Charts” pattern. The code uses d3.v5 APIs including `scaleOrdinal`, `scaleSqrt`, and selection methods like `.call()`, `.enter()`, and `.merge()` to bind data and update the visualization.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/da23ede04f9c427b9e6b54f7c590ca87?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}