Skip to main content

teamColorScale

{
  "domain": [
    "KC",
    "LAC",
    "DEN",
    "LV"
  ],
  "range": [
    "#e31837",
    "#007bc7",
    "#fb4f14",
    "#a5acaf"
  ]
}
import { loadLeague } from "@sportsdataverse/sdvplot";
import { teamColorScale } from "@sportsdataverse/sdvplot/tanstack";

await loadLeague("nfl");
// defineChart({ marks: [lineY(rows, { x: "week", y: "margin", z: "team" })], color: <this> })
teamColorScale("nfl", ["KC", "LAC", "DEN", "LV"], { background: "#111827" });

Tags: docstring · teamColorScale. All sdvplot examples.