NHL standings: grouped, striped, with a record tally and a points-% bar
| Team | W-L-OT | Pts | Points % | |
|---|---|---|---|---|
| Top three: a playoff berth | ||||
| 1st | BUF | 50-23-9 | 109 | |
| 2nd | TBL | 50-26-6 | 106 | |
| 3rd | MTL | 48-24-10 | 106 | |
| Wild-card race and out | ||||
| 4th | BOS | 45-27-10 | 100 | |
| 5th | OTT | 44-27-11 | 99 | |
| 6th | DET | 41-31-10 | 92 | |
| 7th | FLA | 40-38-4 | 84 | |
| 8th | TOR | 32-36-14 | 78 | |
| Source: NHL api-web /v1/standings/now | ||||
import { NHL_STANDINGS } from "@sportsdataverse/examples/data";
import { defineTable } from "@sportsdataverse/sdvtables";
import { renderHTMLAsync } from "@sportsdataverse/sdvtables/html";
// The top three of each division qualify for the playoffs; everyone else is grouped below them.
const rows = NHL_STANDINGS.map((r) => ({
...r,
group: r.division_rank <= 3 ? "Top three: a playoff berth" : "Wild-card race and out",
points_pct: r.points / ((r.wins + r.losses + r.ot_losses) * 2),
}));
const spec = defineTable<(typeof rows)[number]>()
.columns((c) => [
c.rank("division_rank", { label: "" }),
c.logo("team", { league: "nhl", includeName: true, label: "Team" }),
c.tally(["wins", "losses", "ot_losses"], { label: "W-L-OT" }),
c.int("points", { label: "Pts" }),
c.percentileBar("points_pct", { label: "Points %", domain: [0, 100], decimals: 1 }),
])
.groupBy("group")
.groupStripes({ color: "#EEF3FA", start: 1 })
.titleHeader("Atlantic Division", { kicker: "NHL 2025-26", subtitle: "Final regular-season standings" })
.sourceNote("Source: NHL api-web /v1/standings/now")
.theme("swiss")
.build();
await renderHTMLAsync(spec, rows);
Tags: table · recipe · groupBy · groupStripes · percentileBar · tally · logo · nhl. All sdvtables examples.
BUF
TBL
MTL
BOS
OTT
DET
FLA
TOR