Skip to main content

Interface: G2ColorScale<T>

Defined in: packages/sdvplot/src/g2.ts:68

A G2 scale.color: an ordinal scale from each team value to its colour.

Type Parameters​

T​

T = unknown

Properties​

domain​

domain: T[]

Defined in: packages/sdvplot/src/g2.ts:72

The team values exactly as the data holds them (numbers stay numbers), each once and in order.


range​

range: string[]

Defined in: packages/sdvplot/src/g2.ts:74

Their colours, in the same order.


type​

type: "ordinal"

Defined in: packages/sdvplot/src/g2.ts:70

Ordinal: a numeric team column (ESPN ids, say) keeps one colour per id, never a gradient.