Skip to main content
100%

Color Scale

✓ Published0🌍 Public
AAlexDaGr8
Last edited Aug 9, 2018
Created on Aug 7, 2018

A sequential color scale maps a simple array of integers 0 through 39 to the PiYG interpolator, producing a smooth purple-to-green gradient across a single row of rectangular swatches. The visualization, built with D3 v5, uses `d3.scalePoint` to position each rectangle along the x-axis and `d3.scaleSequential` with `d3.interpolatePiYG` to assign its fill. Each rectangle’s width equals the point scale’s `step()`, creating a contiguous band. The rendered SVG highlights how sequential color scales encode ordered data, with the gradient clearly representing the numeric progression from low to high values.

AI-generated description

Built with blockbuilder.org

mit Licensed

Similar vizzes