Skip to main content

Function: hockeyRink()

hockeyRink(league, opts?): Scene

Defined in: packages/sporty/src/hockey/rink.ts:45

Port of sportyR geom_hockey(): one PolygonFeature per ggplot layer R adds, in R's layer order. Divergences: an unknown displayRange throws (R falls back to "full"); units also converts the anchors and display limits (R converts only the feature points, so its non-native plots are broken).

Parameters​

league​

"custom" | "ncaa" | string & object | "ahl" | "echl" | "iihf" | "nhl" | "nwhl" | "ohl" | "phf" | "pwhl" | "qmjhl" | "ushl"

opts?​

SurfaceOptions<HockeyParamUpdates, "plot_background" | "goal_line" | "boards" | "center_line" | "referee_crease" | "zone_line" | "center_faceoff_spot" | "goal_crease_outline" | "goal_crease_fill" | "center_faceoff_circle" | "odzone_faceoff_circle" | "goal_frame" | "off_ice_officials_box" | "ozone_ice" | "nzone_ice" | "dzone_ice" | "restricted_trapezoid" | "faceoff_spot_ring" | "faceoff_spot_stripe" | "faceoff_line" | "goal_fill" | "team_a_bench" | "team_b_bench" | "team_a_penalty_box" | "team_b_penalty_box", "full" | "in_bounds_only" | "in bounds only" | "offense" | "offence" | "defense" | "defence" | "defensive_zone" | "neutral_zone" | "offensive_zone" | "nzone" | "neutral" | "neutral zone" | "ozone" | "offensive zone" | "attacking_zone" | "attacking zone" | "dzone" | "defensive zone" | "defending_zone" | "defending zone"> = {}

Returns​

Scene