Skip to main content

Interface: PassNetworkOptions

Defined in: packages/sdvplot/src/cytoscape.ts:95

passNetwork options.

Extends​

Properties​

background?​

optional background?: string

Defined in: packages/sdvplot/src/cytoscape.ts:81

The background the network is drawn on (Cytoscape's container). Given, every team colour keeps 3:1 contrast against it (dark mode) and aims to stay distinct (CIE76 ΔE of 20 or more) from every other team's, through the shared team palette, as teamColorPalette does in the other adapters (when it cannot, it keeps the readable colour and warns once); a headshot node's name takes the ink that reads on it.

Inherited from​

CyColorOptions.background


edgeWidth?​

optional edgeWidth?: number

Defined in: packages/sdvplot/src/cytoscape.ts:134

The heaviest pair's edge width in px, 1 or more. Default 10.


fallback?​

optional fallback?: string

Defined in: packages/sdvplot/src/cytoscape.ts:83

The colour of an element whose team does not resolve, or has no colour. Default "#808080".

Inherited from​

CyColorOptions.fallback


from​

from: string

Defined in: packages/sdvplot/src/cytoscape.ts:97

Name of the row column holding the passer's player id.


fromName?​

optional fromName?: string

Defined in: packages/sdvplot/src/cytoscape.ts:105

Name of the row column holding the passer's name (the node's label and initials). Default: the id.


headshots?​

optional headshots?: false | "espn" | "gsis"

Defined in: packages/sdvplot/src/cytoscape.ts:132

Which ids from and to hold, for headshots: "espn" (default; ESPN athlete ids) or "gsis" (nflverse; needs loadGsis() first). false draws every player as initials and warns about none. A player with no headshot (a league without ESPN headshots, such as soccer, or an id that does not resolve) is drawn as initials, with one warning naming them.


idSystem?​

optional idSystem?: IdSystem

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

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

Inherited from​

CyColorOptions.idSystem


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/cytoscape.ts:103

The league the teams belong to, e.g. "soccer"; also the league of the headshots.


minWeight?​

optional minWeight?: number

Defined in: packages/sdvplot/src/cytoscape.ts:115

Given, pairs whose weight (passes, or the summed weight column) is smaller are left out; every player stays. Default: none, so no pair is left out (a fractional weight such as xT keeps every pair). 2 or 3 is the usual threshold for a pass map.


nodeSize?​

optional nodeSize?: number

Defined in: packages/sdvplot/src/cytoscape.ts:85

A node's diameter in px, 1 or more. Default 40.

Inherited from​

CyColorOptions.nodeSize


scale?​

optional scale?: number

Defined in: packages/sdvplot/src/cytoscape.ts:125

Model px per data unit of x and y, more than 0. Default 10 (a 105 m pitch is 1,050 px across at zoom 1).


season?​

optional season?: SeasonInput

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

The season the teams are resolved for.

Inherited from​

CyColorOptions.season


team​

team: string

Defined in: packages/sdvplot/src/cytoscape.ts:101

Name of the row column holding the passing team (abbreviation, name or id; see idSystem).


to​

to: string

Defined in: packages/sdvplot/src/cytoscape.ts:99

Name of the row column holding the receiver's player id.


toName?​

optional toName?: string

Defined in: packages/sdvplot/src/cytoscape.ts:107

Name of the row column holding the receiver's name. Default: the id.


weight?​

optional weight?: string

Defined in: packages/sdvplot/src/cytoscape.ts:109

Name of a row column summed per pair in place of counting rows.


which?​

optional which?: Which

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

The team colour drawn, "primary" (default) or "secondary".

Inherited from​

CyColorOptions.which


x?​

optional x?: string

Defined in: packages/sdvplot/src/cytoscape.ts:117

With y, xend and yend: the row columns of each pass's start (x, y) and end; all four or none.


xend?​

optional xend?: string

Defined in: packages/sdvplot/src/cytoscape.ts:121

The pass end's x.


y?​

optional y?: string

Defined in: packages/sdvplot/src/cytoscape.ts:119

The pass start's y (up, as on a plot).


yend?​

optional yend?: string

Defined in: packages/sdvplot/src/cytoscape.ts:123

The pass end's y.