teamColorScale
{
"type": "ordinal",
"domain": [
"KC",
"LAC",
"DEN",
"LV"
],
"range": [
"#e31837",
"#007bc7",
"#002244",
"#000000"
]
}import { loadLeague } from "@sportsdataverse/sdvplot";
import { teamColorScale } from "@sportsdataverse/sdvplot/g2";
await loadLeague("nfl");
// { type: "interval", encode: { x: "team", y: "wins", color: "team" }, scale: { color: <this> } }
teamColorScale("nfl", ["KC", "LAC", "DEN", "LV"]);
Tags: docstring · teamColorScale. All sdvplot examples.