Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of An Exmple for D3.scaleSequential

Public visualization

Viewing a saved revision (read-only)

5a5a84d461a64f20b0d5d932b7ccb113

Fork of An Exmple for D3.scaleSequential

0 stars0🌍 Public
Llimenzi
Last edited May 18, 2021
Created on May 18, 2021

This example demonstrates two D3 sequential color scales by rendering rows of rectangles with varying values. The top row uses `d3.scaleSequential` with the `interpolateRdGy` interpolator, while the bottom row applies `interpolateReds` to a shifted domain. Each rectangle’s fill color maps a numeric value from a fixed range, with black outlines highlighting individual cells. The code uses `d3.scaleLinear` for positioning and renders the SVG output via D3 selections and the `style('fill')` property.

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