{"version":"1.0","type":"rich","title":"Discrete vs continuous diverging scales with d3-scale-chromatic","description":"This example compares discrete and continuous diverging color scales by rendering 2,000 thin vertical lines on a Canvas, with a translucent SVG overlay for the axis. The top band uses a `d3.scaleThreshold` with a domain divided into five steps and the `d3.schemePuOr` array, producing sharp color boundaries. The bottom band uses a `d3.scaleSequential` with `d3.interpolatePuOr` over a continuous [-1, 1] domain, creating a smooth gradient. Both scales map the same input range, and the code relies on d3.v4 and d3-scale-chromatic to draw the comparison.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-b14ba09ede47de4076b6d8c279149d8d?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}