{"version":"1.0","type":"rich","title":"19 - legends: color & size  - dataviz 2018","description":"Two custom legends demonstrate ordinal color and quantitative size encodings in D3 v7. The color legend uses `scaleOrdinal` to map fruit categories to distinct fills, while the size legend uses `scaleSqrt` to map numeric ticks to circle radii. Both are rendered as SVG groups with circle and text elements, updated through D3’s selection-merging API. The example highlights reusable legend construction patterns within a single static visualization.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/767cb76ca34d46028823a0037dba0b86?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}