Skip to main content

Interface: ShotCellsOptions

Defined in: packages/sdvplot/src/plot/shots.ts:109

Options for shotCells.

Extends​

Properties​

ariaDescription?​

optional ariaDescription?: string

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:257

The aria-description; a constant textual description.

Inherited from​

GeoPassThrough.ariaDescription


ariaHidden?​

optional ariaHidden?: string

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:265

The aria-hidden state; a constant indicating whether the element is exposed to an accessibility API.

Inherited from​

GeoPassThrough.ariaHidden


ariaLabel?​

optional ariaLabel?: ChannelValue

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:273

The aria-label; a channel specifying short textual labels representing the value in the accessibility tree.

Inherited from​

GeoPassThrough.ariaLabel


channels?​

optional channels?: Record<string, ChannelValue | Channel>

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:473

An object defining additional custom channels. This meta option may be used by an initializer to declare extra channels.

Inherited from​

GeoPassThrough.channels


className?​

optional className?: string

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:250

The class attribute; a constant string.

Inherited from​

GeoPassThrough.className


clip?​

optional clip?: boolean | "frame" | "sphere" | GeoPermissibleObjects | null

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:305

How to clip the mark; one of:

  • frame or true - clip to the plot’s frame (inner area)
  • sphere - clip to the projected sphere (e.g., front hemisphere)
  • geojson - a GeoJSON object, typically with polygonal geometry
  • null or false - do not clip

The sphere clip option requires a geographic projection.

Inherited from​

GeoPassThrough.clip


dropOutside?​

optional dropOutside?: boolean

Defined in: packages/sdvplot/src/plot/shots.ts:132

Drop the cells centred outside the plot's frame, as blazing-the-nets main drops those past its viewport (hexShotChart.ts:74); a cell centred inside is drawn whole. Not Plot's clip (which cuts paths, and passes through). Default true. Was clip before Phase 11.


dx?​

optional dx?: number

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:311

The horizontal offset in pixels; a constant option. On low-density screens, an additional 0.5px offset may be applied for crisp edges.

Inherited from​

GeoPassThrough.dx


dy?​

optional dy?: number

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:317

The vertical offset in pixels; a constant option. On low-density screens, an additional 0.5px offset may be applied for crisp edges.

Inherited from​

GeoPassThrough.dy


facet?​

optional facet?: boolean | "auto" | "include" | "exclude" | "super" | null

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:185

Whether to enable or disable faceting; one of:

  • auto (default) - automatically determine if this mark should be faceted
  • include (or true) - draw the subset of the mark’s data in the current facet
  • exclude - draw the subset of the mark’s data not in the current facet
  • super - draw this mark in a single frame that covers all facets
  • null (or false) - repeat this mark’s data across all facets (i.e., no faceting)

When a mark uses super faceting, it is not allowed to use position scales (x, y, fx, or fy); super faceting is intended for decorations, such as labels and legends.

When top-level faceting is used, the default auto setting is equivalent to include when the mark data is strictly equal to the top-level facet data; otherwise it is equivalent to null. When the include or exclude facet mode is chosen, the mark data must be parallel to the top-level facet data: the data must have the same length and order. If the data are not parallel, then the wrong data may be shown in each facet. The default auto therefore requires strict equality (===) for safety, and using the facet data as mark data is recommended when using the exclude facet mode. (To construct parallel data safely, consider using array.map on the facet data.)

When mark-level faceting is used, the default auto setting is equivalent to include: the mark will be faceted if either the fx or fy channel option (or both) is specified. The null or false option will disable faceting, while exclude draws the subset of the mark’s data not in the current facet.

Inherited from​

GeoPassThrough.facet


facetAnchor?​

optional facetAnchor?: "bottom" | "top" | "left" | "right" | "top-left" | "top-right" | "bottom-right" | "bottom-left" | "top-empty" | "right-empty" | "bottom-empty" | "left-empty" | "empty" | null

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:198

How to place the mark with respect to facets; one of:

  • null (default for most marks) - display the mark in each non-empty facet
  • top, right, bottom, or left - display the mark only in facets on the given side
  • top-empty, right-empty, bottom-empty, or left-empty (default for axis marks) - display the mark only in facets that have empty space on the given side: either the margin, or an empty facet
  • empty - display the mark in empty facets only

Inherited from​

GeoPassThrough.facetAnchor


fillOpacity?​

optional fillOpacity?: ChannelValueSpec

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:337

The fill-opacity; a constant number between 0 and 1, or a channel typically bound to the opacity scale. If all channel values are numbers in [0, 1], by default the channel will not be bound to the opacity scale, interpreting the opacities literally.

Inherited from​

GeoPassThrough.fillOpacity


filter?​

optional filter?: ChannelValue

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:86

Applies a transform to filter the mark’s index according to the given channel values; only truthy values are retained. For example, to show only data whose body mass is greater than 3,000g:

filter: (d) => d.body_mass_g > 3000

Note that filtering only affects the rendered mark index, not the associated channel values, and thus has no effect on imputed scale domains.

Inherited from​

GeoPassThrough.filter


frame?​

optional frame?: "hockeytech" | Frame | "nba-legacy" | "nba-legacy-vertical" | "espn-football-0-100"

Defined in: packages/sdvplot/src/plot/shots.ts:122

Legacy tenths to plot coordinates: a sporty frame name or Frame; default "nba-legacy".


fx?​

optional fx?: ChannelValue

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:145

The horizontal facet position channel, for mark-level faceting, bound to the fx scale.

Inherited from​

GeoPassThrough.fx


fy?​

optional fy?: ChannelValue

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:151

The vertical facet position channel, for mark-level faceting, bound to the fy scale.

Inherited from​

GeoPassThrough.fy


href?​

optional href?: ChannelValue

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:458

The href; a channel specifying URLs for clickable links. May be used in conjunction with the target option to open links in another window.

Inherited from​

GeoPassThrough.href


imageFilter?​

optional imageFilter?: string

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:433

A CSS filter; a constant string used to adjust the rendering of images, such as blur(5px).

Inherited from​

GeoPassThrough.imageFilter


initializer?​

optional initializer?: InitializerFunction

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:136

A custom mark initializer.

Inherited from​

GeoPassThrough.initializer


margin?​

optional margin?: number

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:219

Shorthand to set the same default for all four mark margins: marginTop, marginRight, marginBottom, and marginLeft; typically defaults to 0, except for axis marks.

Inherited from​

GeoPassThrough.margin


marginBottom?​

optional marginBottom?: number

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:237

The mark’s bottom margin; the minimum distance in pixels between the bottom edges of the inner and outer plot area.

Inherited from​

GeoPassThrough.marginBottom


marginLeft?​

optional marginLeft?: number

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:243

The mark’s left margin; the minimum distance in pixels between the left edges of the inner and outer plot area.

Inherited from​

GeoPassThrough.marginLeft


marginRight?​

optional marginRight?: number

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:231

The mark’s right margin; the minimum distance in pixels between the right edges of the mark’s inner and outer plot area.

Inherited from​

GeoPassThrough.marginRight


marginTop?​

optional marginTop?: number

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:225

The mark’s top margin; the minimum distance in pixels between the top edges of the inner and outer plot area.

Inherited from​

GeoPassThrough.marginTop


mixBlendMode?​

optional mixBlendMode?: string

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:425

The mix-blend-mode; a constant string specifying how to blend content such as multiply.

Inherited from​

GeoPassThrough.mixBlendMode


opacity?​

optional opacity?: ChannelValueSpec

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:417

The opacity; a constant between 0 and 1, or a channel typically bound to the opacity scale. If all channel values are numbers in [0, 1], by default the channel will not be bound to the opacity scale, interpreting the opacities literally. For faster rendering, prefer the strokeOpacity or fillOpacity option.

Inherited from​

GeoPassThrough.opacity


paintOrder?​

optional paintOrder?: string

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:443

The paint-order; a constant string specifying the order in which the fill, stroke, and any markers are drawn; defaults to normal, which draws the fill, then stroke, then markers; defaults to stroke for the text mark to create a “halo” around text to improve legibility.

Inherited from​

GeoPassThrough.paintOrder


pointerEvents?​

optional pointerEvents?: string

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:280

The pointer-events property; a constant string such as none.

Inherited from​

GeoPassThrough.pointerEvents


prior?​

optional prior?: number

Defined in: packages/sdvplot/src/plot/shots.ts:120

shrunkDiff prior in attempts; default 25 (main), 0 = the raw difference (master).


r​

r: number | readonly number[]

Defined in: packages/sdvplot/src/plot/shots.ts:114

Size per cell in legacy tenths (sizeCells(cells, …).r) or one size for all: a hexagon's circumradius, or a square's side. 0 hides a cell.


render?​

optional render?: RenderFunction

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:139

A custom render transform.

Inherited from​

GeoPassThrough.render


reverse?​

optional reverse?: boolean

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:92

Applies a transform to reverse the order of the mark’s index, say for reverse input order.

Inherited from​

GeoPassThrough.reverse


scale?​

optional scale?: DiffScale

Defined in: packages/sdvplot/src/plot/shots.ts:118

Colour of each cell's shrunk FG% vs league; default diffScale().


shape?​

optional shape?: BinShape

Defined in: packages/sdvplot/src/plot/shots.ts:116

The cells' shape, as binned (binShots, leagueIndex); default "hex".


shapeRendering?​

optional shapeRendering?: string

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:450

The shape-rendering; a constant string such as crispEdges.

Inherited from​

GeoPassThrough.shapeRendering


sort?​

optional sort?: SortOrder | ChannelDomainSort

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:130

Either applies a transform to sort the mark’s index by the specified channel values, or imputes ordinal scale domains from this mark’s channels.

When imputing ordinal scale domains from channel values, the sort option is an object whose keys are ordinal scale names such as x or fx, and whose values are channel names such as y, y1, or y2. For example, to impute the y scale’s domain from the associated x channel values in ascending order:

sort: {y: "x"}

For different sort options for different scales, replace the channel name with a value object and per-scale options:

sort: {y: {value: "-x"}}

When sorting the mark’s index, the sort option is instead one of:

  • a function for comparing data, returning a signed number
  • a channel value definition for sorting given values in ascending order
  • a {value, order} object for sorting given values
  • a {channel, order} object for sorting the named channel’s values

For example, to render in order of ascending body mass:

sort: "body_mass_g"

See also the Plot.sort transform.

Inherited from​

GeoPassThrough.sort


stroke?​

optional stroke?: ChannelValueSpec

Defined in: packages/sdvplot/src/plot/shots.ts:124

Default var(--sdv-muted, #525252), so near-average cells stay visible (hexShotChart.ts:159-161).

Overrides​

GeoPassThrough.stroke


strokeDasharray?​

optional strokeDasharray?: string | number

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:357

The stroke-dasharray; a constant number indicating the length in pixels of alternating dashes and gaps, or a constant string of numbers separated by spaces or commas (e.g., 10 2 for dashes of 10 pixels separated by gaps of 2 pixels), or none (the default) for no dashing

Inherited from​

GeoPassThrough.strokeDasharray


strokeDashoffset?​

optional strokeDashoffset?: string | number

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:365

The stroke-dashoffset; a constant indicating the offset in pixels of the first dash along the stroke; defaults to zero.

Inherited from​

GeoPassThrough.strokeDashoffset


strokeLinecap?​

optional strokeLinecap?: string

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:373

The stroke-linecap; a constant specifying how to cap stroked paths, such as butt, round, or square.

Inherited from​

GeoPassThrough.strokeLinecap


strokeLinejoin?​

optional strokeLinejoin?: string

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:381

The stroke-linejoin; a constant specifying how to join stroked paths, such as bevel, miter, miter-clip, or round.

Inherited from​

GeoPassThrough.strokeLinejoin


strokeMiterlimit?​

optional strokeMiterlimit?: number

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:389

The stroke-miterlimit; a constant number specifying how to limit the length of miter joins on stroked paths.

Inherited from​

GeoPassThrough.strokeMiterlimit


strokeOpacity?​

optional strokeOpacity?: ChannelValueSpec

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:399

The stroke-opacity; a constant between 0 and 1, or a channel typically bound to the opacity scale. If all channel values are numbers in [0, 1], by default the channel will not be bound to the opacity scale, interpreting the opacities literally.

Inherited from​

GeoPassThrough.strokeOpacity


strokeWidth?​

optional strokeWidth?: ChannelValueSpec

Defined in: packages/sdvplot/src/plot/shots.ts:126

Default 0.85 px.

Overrides​

GeoPassThrough.strokeWidth


target?​

optional target?: string

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:467

The target; a constant string specifying the target window (e.g., _blank) for clickable links; used in conjunction with the href option.

Inherited from​

GeoPassThrough.target


tip?​

optional tip?: boolean | TipPointer | TipOptions & PointerOptions & object

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:293

Whether to generate a tooltip for this mark, and any tip options.

Inherited from​

GeoPassThrough.tip


title?​

optional title?: ChannelValue

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:290

The title; a channel specifying accessible, short textual descriptions as strings (possibly with newlines). If the tip option is specified, the title will be displayed with an interactive tooltip instead of using the SVG title element.

Inherited from​

GeoPassThrough.title


transform?​

optional transform?: TransformFunction

Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:133

A custom mark transform.

Inherited from​

GeoPassThrough.transform