Interface: ShotZonesOptions
Defined in: packages/sdvplot/src/plot/shots.ts:254
Options for shotZones.
Extends
Properties
ariaDescription?
optionalariaDescription?: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?
optionalariaHidden?: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?
optionalariaLabel?: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?
optionalchannels?: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?
optionalclassName?: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?
optionalclip?: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
dx?
optionaldx?: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?
optionaldy?: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?
optionalfacet?: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?
optionalfacetAnchor?:"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
fill
fill: (
zone) =>string
Defined in: packages/sdvplot/src/plot/shots.ts:256
Fill per zone (e.g. diffScale() of the zone's shrunk diff).
Parameters
zone
"restricted_area" | "paint" | "mid_range" | "corner_3_left" | "corner_3_right" | "above_break_3"
Returns
string
fillOpacity?
optionalfillOpacity?:ChannelValueSpec
Defined in: packages/sdvplot/src/plot/shots.ts:267
Default 0.85 (hexShotChart.ts:110).
Overrides
GeoPassThrough.fillOpacity
filter?
optionalfilter?: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?
optionalframe?:"hockeytech"|Frame|"nba-legacy"|"nba-legacy-vertical"|"espn-football-0-100"
Defined in: packages/sdvplot/src/plot/shots.ts:265
The SAME frame as the shots (zones built with scale: 10 are in legacy tenths); default "nba-legacy".
fx?
optionalfx?: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?
optionalfy?: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?
optionalhref?: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?
optionalimageFilter?: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?
optionalinitializer?: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?
optionalmargin?: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?
optionalmarginBottom?: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?
optionalmarginLeft?: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?
optionalmarginRight?: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?
optionalmarginTop?: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?
optionalmixBlendMode?: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?
optionalopacity?: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?
optionalpaintOrder?: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?
optionalpointerEvents?: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
render?
optionalrender?: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?
optionalreverse?: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
shapeRendering?
optionalshapeRendering?: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?
optionalsort?: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
stats?
optionalstats?:Readonly<Record<"restricted_area"|"paint"|"mid_range"|"corner_3_left"|"corner_3_right"|"above_break_3",Split>>
Defined in: packages/sdvplot/src/plot/shots.ts:269
Per-zone makes and attempts (statsByZone(shots)): with tip, each zone shows them.
stroke?
optionalstroke?:ChannelValueSpec
Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:347
The stroke; a constant CSS color string, or a channel typically bound to the color scale. If all channel values are valid CSS colors, by default the channel will not be bound to the color scale, interpreting the colors literally.
Inherited from
GeoPassThrough.stroke
strokeDasharray?
optionalstrokeDasharray?: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?
optionalstrokeDashoffset?: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?
optionalstrokeLinecap?: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?
optionalstrokeLinejoin?: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?
optionalstrokeMiterlimit?: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?
optionalstrokeOpacity?: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?
optionalstrokeWidth?:ChannelValueSpec
Defined in: node_modules/.pnpm/@observablehq+plot@0.6.17/node_modules/@observablehq/plot/src/mark.d.ts:406
The stroke-width; a constant number in pixels, or a channel.
Inherited from
GeoPassThrough.strokeWidth
target?
optionaltarget?: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
text?
optionaltext?: (zone) =>string
Defined in: packages/sdvplot/src/plot/shots.ts:263
A label per zone at its anchor, haloed so it reads over any fill (hexShotChart.ts:83-95); omit for none. Labels
take no pointer events, so a click or hover on one reaches the zone under it. They are hidden from assistive
technology, so each zone's accessible name carries its label's text after the zone's name ("Paint (non-RA),
136/326").
Parameters
zone
"restricted_area" | "paint" | "mid_range" | "corner_3_left" | "corner_3_right" | "above_break_3"
Returns
string
tip?
optionaltip?: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?
optionaltitle?: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?
optionaltransform?: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