scaleNote: columns divided, with a note saying so
| Team | PF / g | PA / g |
|---|---|---|
![]() | 22.6 | 19.2 |
![]() | 23.6 | 17.7 |
![]() | 25.0 | 18.3 |
![]() | 18.2 | 25.5 |
![]() | 30.9 | 21.6 |
![]() | 20.3 | 21.4 |
![]() | 19.9 | 23.8 |
![]() | 17.0 | 24.5 |
| Points per game (17 games). | ||
import { STANDINGS, type Standing } from "@sportsdataverse/examples/data";
import { defineTable } from "@sportsdataverse/sdvtables";
import { renderHTMLAsync } from "@sportsdataverse/sdvtables/html";
// Any divisor works; 1,000 and 1,000,000 come with their own wording ("Figures in thousands.").
const spec = defineTable<Standing>()
.columns((c) => [
c.logo("team", { league: "nfl" }),
c.int("pf", { label: "PF" }),
c.int("pa", { label: "PA" }),
])
.scaleNote(["pf", "pa"], {
divisor: 17,
decimals: 1,
where: "both",
note: "Points per game (17 games).",
labelSuffix: "/ g",
})
.title("AFC, 2024")
.build();
await renderHTMLAsync(spec, STANDINGS);
Tags: decoration · scaleNote · gt_scale_note. All sdvtables examples.







