Function: appendSurface()
appendSurface<
G,D>(selection,scene,x,y,o?):Sel<SVGGElement,D>
Defined in: packages/sporty/src/d3.ts:14
Append a Scene to a d3 selection as <g class="sporty-surface">, drawn through the caller's x/y
scale functions: optional background rect, then polygons and text in zIndex order. Applies the
same skips as toSVG (see isVisiblePolygon / isVisibleText). Text font size is the number
height (fitBox[1] / 1.5) mapped through y. ariaDescription (default: the scene's league and sport, then
"surface", such as "nba basketball surface", as surfaceMark) describes the group for assistive technology.
Type Parameters
G
G extends SVGGElement | SVGSVGElement
D
D
Parameters
selection
Sel<G, D>
scene
x
(v) => number
y
(v) => number
o?
ariaDescription?
string
Returns
Sel<SVGGElement, D>