{"version":"1.0","type":"rich","title":"Sequential Color Legend in D3","description":"This example demonstrates how to generate a sequential color legend using Susie Lu’s d3-legend library. It renders a small SVG with a legend title and five color cells, mapping a domain of seven distance values to a red interpolator via `d3.scaleSequential` and `d3.interpolateReds`. The legend is created with `d3.legendColor()`, configured with a title and scale, and attached to an SVG group using a standard D3 selection and `.call()`. The chart uses D3 v7 and d3-legend v2.25.6, rendering entirely as inline SVG.","provider_name":"VizHub AI Studio","provider_url":"https://vizhub.com","html":"<iframe src=\"https://vizhub.com/viz/8fe8ecd2b6124eb39d88c9855166e4bc?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"0\"></iframe>","width":960,"height":500,"cache_age":3600}