Skip to main content
100%

4.0 Color Scales - Sequential

✓ Published0🌍 Public
TThanaporn-sk
Last edited May 3, 2017
Created on May 3, 2017

This example showcases 27 sequential color scales, comparing those built into D3 v4 with those from the d3-scale-chromatic library. The visualization renders a full-width set of thin vertical bars, initially colored using the Inferno scale, with each bar’s fill mapped to its x-position via a `d3.scaleSequential` interpolator. Clicking a button above the chart triggers a transition that smoothly recolors the bars using the selected interpolator, such as Viridis, Blues, or YlGnBu. The interface uses SVG rectangles and D3’s transition API for animated updates, with the code leveraging `d3.range` and data-driven styling.

AI-generated description

forked from <a href='http://bl.ocks.org/pstuffa/'>pstuffa</a>'s block: <a href='http://bl.ocks.org/pstuffa/d5934843ee3a7d2cc8406de64e6e4ea5'>4.0 Color Scales - Sequential</a>

mit Licensed

Similar vizzes