Skip to main content

Interface: PerspectiveConfigOptions

Defined in: packages/sdvplot/src/perspective.ts:66

perspectiveConfig options.

Properties​

background?​

optional background?: string

Defined in: packages/sdvplot/src/perspective.ts:88

The colour the teams must read against. Default: the Perspective theme's (#ffffff Pro Light, #242526 Pro Dark).


formats?​

optional formats?: Readonly<Record<string, PerspectiveNumberFormat | null>>

Defined in: packages/sdvplot/src/perspective.ts:90

Per column, a number_format to use instead of the default, or null for none.


idSystem?​

optional idSystem?: IdSystem

Defined in: packages/sdvplot/src/perspective.ts:94

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/perspective.ts:70

The SDV league key, e.g. "nfl".


logoCol?​

optional logoCol?: string

Defined in: packages/sdvplot/src/perspective.ts:86

A logo URL column (perspectiveLogoColumn) to show as links on the Datagrid, which draws no images.


mode?​

optional mode?: "dark" | "light"

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

"light" (default) or "dark": the Perspective theme, "Pro Light" or "Pro Dark".


plugin?​

optional plugin?: string

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

The plugin: "Datagrid" (the default) or a chart's name ("Y Bar", "X Bar", "Y Line", "X/Y Scatter", …).


schema?​

optional schema?: Readonly<Record<string, PerspectiveType>>

Defined in: packages/sdvplot/src/perspective.ts:102

The column types, as await table.schema() gives them. Default: worked out from the rows as Perspective does (numbers, and strings that read as numbers, are "integer" or "float"; anything else is not a number). Pass it when you load the table with a schema of your own.


season?​

optional season?: SeasonInput

Defined in: packages/sdvplot/src/perspective.ts:92

One season for every team.


strict?​

optional strict?: boolean

Defined in: packages/sdvplot/src/perspective.ts:96

Throw UnresolvedTeamError for a team that does not resolve, instead of one warning and #808080.


teamCol​

teamCol: string

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

The column holding the team identifiers (any id system resolve reads).


theme?​

optional theme?: PerspectiveTheme | ((mode) => PerspectiveTheme)

Defined in: packages/sdvplot/src/perspective.ts:84

A registry table theme: best as a function of the mode, (m) => tableThemeSpec(name, m) from @sportsdataverse/sdvtables, called with this call's mode on every plugin (so a light-only theme in dark mode throws, as in Python). A spec object works too; it does not say its mode, so resolve it in the same mode. The Datagrid takes its body face and size (plugin_config), its sign colours on every number column (fg_color; Perspective reads only #hex and rgb() colours there) and, when the numeric face is not the body face, that face on the number columns. Perspective takes each face as one family name, so the page loads the font (Google Fonts) or the browser draws its default. A chart takes none of it.