wrapLabels: long column labels on several lines
| Team | Points scored, regular season | Points allowed, regular season |
|---|---|---|
![]() | 385 | 326 |
![]() | 402 | 301 |
![]() | 425 | 311 |
![]() | 309 | 434 |
![]() | 525 | 368 |
![]() | 345 | 364 |
![]() | 338 | 404 |
![]() | 289 | 417 |
import { STANDINGS, type Standing } from "@sportsdataverse/examples/data";
import { defineTable } from "@sportsdataverse/sdvtables";
import { renderHTMLAsync } from "@sportsdataverse/sdvtables/html";
const spec = defineTable<Standing>()
.columns((c) => [
c.logo("team", { league: "nfl" }),
c.int("pf", { label: "Points scored, regular season" }),
c.int("pa", { label: "Points allowed, regular season" }),
])
.wrapLabels({ width: 10 })
.title("AFC, 2024")
.build();
await renderHTMLAsync(spec, STANDINGS);
Tags: decoration · wrapLabels · gt_wrap_labels. All sdvtables examples.







