{"version":"1.0","type":"rich","title":"Discrete vs continuous sequential scales with d3-scale-chromatic","description":"This example contrasts discrete and continuous sequential color scales by drawing two bands of vertical lines on a canvas, with an SVG axis overlay. The top band uses a `d3.scaleThreshold` with `d3.schemeGreens[5]` to produce five distinct color steps, while the bottom band uses a `d3.scaleSequential` with `d3.interpolateGreens` for a smooth gradient. Both map a 0–100 domain to color, with lines sampled every 0.001 units. The code renders 100,000 lines per band using the Canvas 2D API for speed, while D3 v4 and d3-scale-chromatic handle the scales and axis.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-c6874e1d1b2e1cf656e6cd4074b6013d?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}