Function: headshotMarker()
headshotMarker(
o):MuiMarkerSlot
Defined in: packages/sdvplot/src/mui.ts:413
ESPN player headshots as a scatter's points (marker slot), from players[i] for point i; twice the series'
markerSize tall. An id with no headshot draws nothing and warns once. idSystem: "gsis" needs loadGsis() first.
Parameters
o
Returns
Example
import { ScatterChart } from "@mui/x-charts/ScatterChart";
import { headshotMarker } from "@sportsdataverse/sdvplot/mui";
// Patrick Mahomes (ESPN 3139477): 2024, 3,928 passing yards and 26 touchdowns
<ScatterChart
width={400}
height={300}
series={[{ data: [{ x: 3928, y: 26 }], markerSize: 20 }]}
slots={{ marker: headshotMarker({ league: "nfl", players: ["3139477"] }) }}
/>;