Skip to main content

A table framed for a social post: handles, a watermark and a composed caption

Buffalo wins the Atlantic

NHL 2025-26, final regular-season standings

TeamW-L-OTPoints
50-23-9109
50-26-6106
48-24-10106
45-27-10100
44-27-1199
41-31-1092
40-38-484
32-36-1478
SportsDataverse | sportsdataverse

Tampa Bay and Montreal tied on 106 points; Toronto finished last

Source: NHL api-web /v1/standings/now

import { NHL_STANDINGS } from "@sportsdataverse/examples/data";
import { defineTable } from "@sportsdataverse/sdvtables";
import { composePage } from "@sportsdataverse/sdvtables/export";
import { renderHTMLAsync } from "@sportsdataverse/sdvtables/html";

const spec = defineTable<(typeof NHL_STANDINGS)[number]>()
.columns((c) => [
c.logo("team", { league: "nhl", includeName: true, label: "Team" }),
c.tally(["wins", "losses", "ot_losses"], { label: "W-L-OT" }),
c.colorPills("points", { label: "Points", digits: 0, domain: [70, 110] }),
])
.socialTag({ x: "SportsDataverse", gh: "sportsdataverse" })
.watermark({ text: "SDV", angle: -20, opacity: 0.05 })
.theme("sdv", { density: "social" })
.build();
// In Chromium, socialCrop(spec, NHL_STANDINGS, { aspect: "1:1" }) is the table alone on a square canvas, and
// htmlToPNG(page) is this framed page as an image.
composePage(await renderHTMLAsync(spec, NHL_STANDINGS), {
title: "Buffalo wins the Atlantic",
subtitle: "NHL 2025-26, final regular-season standings",
caption: "Tampa Bay and Montreal tied on 106 points; Toronto finished last",
sourceNote: "Source: NHL api-web /v1/standings/now",
});

Tags: node · table · export · composePage · socialTag · watermark · social · nhl. All sdvtables examples.