Skip to main content

Function: surface()

surface(league, o?): ChartSurface

Defined in: packages/sdvplot/src/chartjs-surface.ts:37

A team-painted sporty surface as a Chart.js background: a shot chart is a scatter (a hexbin, a bubble chart) over a court. Throws InputError for a league without a surface, or for a scene whose bbox is empty (an xlim or ylim of zero width) here, when it is built, not inside a Chart.js draw. A non-linear axis is left unpainted, with one warning.

Parameters​

league​

"aaf" | "ahl" | "cfb" | "cricket" | "echl" | "mbb" | "milb" | "mlb" | "nba" | "nbagl" | "ncaa_baseball" | "ncaa_mhockey" | "ncaa_softball" | "ncaa_whockey" | "nfl" | "nhl" | "ohl" | "phf" | "pwhl" | "qmjhl" | "soccer" | "ufl" | "usfl" | "ushl" | "wbb" | "whl" | "wnba" | "xfl"

o?​

ChartSurfaceOptions = {}

Returns​

ChartSurface