ValueColouring

How a mark that reads a number of its own — a heatmap's cells, a choropleth's regions, a surface's height — is coloured, from its colour:

@internote/canvas-sdkType
On this page
import { ValueColouring } from '@internote/canvas-sdk';
  • ramp: a ramp over the readings. Written plain, it spans the readings' own range: colour: temperature, colour: blue (that hue's own run), colour: red, white, blue (the stops). Applied, #self.value -> -1..1 -> temperature pins the window the ramp spans;
  • looks: a map — bands or categories — each item flat in the colour its key gives, through itemColours.

#Signature

{
    kind: "ramp";
    colour: string | undefined;
    window: {
        start: number;
        end: number;
    } | null;
} | {
    kind: "looks";
}

Declared in packages/canvas-sdk/src/data/item-looks.ts:279.

Last updated