shade function
Where a value sits on the color scale, 0..1.
import { shade } from '@dioramajs/data/heatmap'Amounts run from 0 (an empty cell) to top; values on both sides of 0 run from -top to top with 0 in the middle. steps > 0 snaps to that many even bins, as a legend can name them.
function shade(
value: number,
top: number,
split: boolean,
steps: number,
): numberParameters
| Name | Type | Description |
|---|---|---|
value | number | |
top | number | |
split | boolean | |
steps | number |
Defined in packages/data/src/heatmap.ts.