Skip to main content
100%

An Exmple for D3.scaleSequential

✓ Published1🌍 Public
NNikkor
Last edited Sep 12, 2018
Created on Sep 12, 2018

This example demonstrates how D3’s `scaleSequential` maps continuous numeric domains to color interpolators. It shows two rows of rectangles, each colored by a different sequential scale: one using `interpolateRdGy` and another using `interpolateReds`. The code uses `scaleSequential` with explicit domains and applies the resulting colors as SVG fill styles. A `scaleLinear` positions the rectangles horizontally, and black-outlined polygons mark a selected range. The visualization relies on D3 v5 and renders entirely as SVG.

AI-generated description

Ming Zhang <br> This is an example for D3.scaleSequential. The code is inspired by the scaleSequential example in GitHub - d3/d3-scale

MIT Licensed

Similar vizzes