{"version":"1.0","type":"rich","title":"SVG vs Canvas D3","description":"This example compares the performance of rendering 20,000 lines using SVG versus Canvas in D3 v4. It demonstrates both discrete diverging color scales with `d3.scaleThreshold` and `d3.schemePuOr`, and continuous diverging scales with `d3.scaleSequential` and `d3.interpolatePuOr`. Two buttons trigger drawing with either approach, and each displays the elapsed time via the `performance.now()` API. The SVG version appends individual `<path>` elements, while the Canvas version draws directly to a 2D context and overlays an SVG axis.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-08d7f257abdf8600dd94eb017354a4aa?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}