logoLayer
import { SwarmPlot } from "@nivo/swarmplot";
import { loadLeague } from "@sportsdataverse/sdvplot";
import { logoLayer, teamColors } from "@sportsdataverse/sdvplot/nivo";
await loadLeague("nfl");
const rows = [
{ team: "KC", pf: 385 },
{ team: "LAC", pf: 402 },
{ team: "DEN", pf: 425 },
];
<SwarmPlot
width={500}
height={200}
data={rows.map((r) => ({ ...r, group: "AFC West" }))}
groups={["AFC West"]}
id="team"
value="pf"
size={10}
colors={teamColors({ league: "nfl" })}
layers={["grid", "axes", "circles", logoLayer({ league: "nfl", height: 0.2 })]}
/>;
Tags: docstring · logoLayer. All sdvplot examples.