Skip to main content

Function: teamTiers()

teamTiers(rows, o): PlotOptions

Defined in: packages/sdvplot/src/plot/tiers.ts:35

A tier plot as Plot.plot options (SSR-composable; the caller runs Plot.plot): tier 1 on top, logos ranked within each tier, separator rules, wrapped tier labels on the y axis.

Parameters​

rows​

readonly TierRow[]

o​

TeamTiersOptions

Returns​

PlotOptions

Example​

import * as Plot from "@observablehq/plot";
import { loadLeague } from "@sportsdataverse/sdvplot";
import { teamTiers } from "@sportsdataverse/sdvplot/plot";

await loadLeague("nfl");
const rows = [
{ team: "BUF", tier_no: 1 },
{ team: "KC", tier_no: 1 },
{ team: "MIA", tier_no: 2 },
{ team: "NE", tier_no: 3 },
];
Plot.plot(teamTiers(rows, { league: "nfl" }));