mergeStackTeamColor: two lines, the lower in the team colour
| Quarterback | Wins |
|---|---|
Patrick Mahomes
KC | 15 |
Justin Herbert
LAC | 11 |
Bo Nix
DEN | 10 |
Gardner Minshew
LV | 4 |
Josh Allen
BUF | 13 |
Tua Tagovailoa
MIA | 8 |
Aaron Rodgers
NYJ | 5 |
Drake Maye
NE | 4 |
import { STANDINGS, type Standing } from "@sportsdataverse/examples/data";
import { defineTable } from "@sportsdataverse/sdvtables";
import { renderHTMLAsync } from "@sportsdataverse/sdvtables/html";
// key on top, stack below; team picks the colour (made readable against the table background).
const spec = defineTable<Standing>()
.columns((c) => [
c.mergeStackTeamColor("qb", "team", "team", { league: "nfl", label: "Quarterback" }),
c.int("wins"),
])
.title("AFC, 2024")
.build();
await renderHTMLAsync(spec, STANDINGS);
Tags: kind · mergeStackTeamColor · gt_merge_stack_team_color · nfl. All sdvtables examples.