Skip to main content

Interface: NivoColorOptions

Defined in: packages/sdvplot/src/nivo.ts:315

teamColors options.

Properties​

background?​

optional background?: string

Defined in: packages/sdvplot/src/nivo.ts:340

The chart's background. Given, a team colour under 3:1 contrast against it is swapped for the team's other colour, else moved towards white (on a dark background) or black (a light one) until it reads: dark mode. A colour that would then sit too close to an earlier team's (CIE76 ΔE under 20) takes the team's other colour, or the nearest colour to its own (lightness, hue or chroma stepped) that is distinct and still reads; failing that it is kept, with one warning.


by?​

optional by?: string

Defined in: packages/sdvplot/src/nivo.ts:322

The field holding the team: read from the datum nivo hands colors (a Bump series, a Chord arc), else from its data (a SwarmPlot node's datum). Default "id".


fallback?​

optional fallback?: string

Defined in: packages/sdvplot/src/nivo.ts:332

The colour of an unresolved team. Default "#808080".


idSystem?​

optional idSystem?: IdSystem

Defined in: packages/sdvplot/src/nivo.ts:330

How the team values are read. Default "auto".


league​

league: "aaf" | "ahl" | "ajhl" | "bchl" | "cchl" | "cebl" | "cfb" | "cfl" | "chl" | "cricket" | "easl" | "echl" | "f1" | "fiba" | "gojhl" | "iihf" | "kijhl" | "lba" | "mbb" | "mhl" | "milb" | "mjhl" | "mlb" | "nba" | "nbagl" | "nbl" | "ncaa_baseball" | "ncaa_mhockey" | "ncaa_softball" | "ncaa_whockey" | "nfl" | "nhl" | "nojhl" | "ohl" | "ojhl" | "phf" | "pwhl" | "qmjhl" | "sjhl" | "soccer" | "sphl" | "ufl" | "usfl" | "ushl" | "vijhl" | "wbb" | "whl" | "wnba" | "xfl"

Defined in: packages/sdvplot/src/nivo.ts:317

The league the teams belong to, e.g. "nfl".


season?​

optional season?: SeasonInput

Defined in: packages/sdvplot/src/nivo.ts:328

The season the teams are resolved for (a number or string).


teams?​

optional teams?: readonly unknown[]

Defined in: packages/sdvplot/src/nivo.ts:324

Every team the chart draws, in order. Needed with background: the palette keeps them apart from each other.


which?​

optional which?: Which

Defined in: packages/sdvplot/src/nivo.ts:326

"primary" (default) or "secondary" colour.