projects/common/chart/scales/ordinal.ts
Pure-TS ordinal scale. Maps a discrete categorical domain to a cycling palette of values (typically colours). When the domain is longer than the palette, mappings wrap modulo palette length.
createOrdinalScale(domain, colors)
Ordered list of categorical values. Values are matched by reference equality on lookup.
Palette to cycle through. Must have at least one entry; an empty palette throws synchronously at construction time.
string
Callable (v: T) => string returning the palette entry for v. Lookup of an unknown value returns the palette's first entry.
(v: T) => string
v