passArcLayer
[ 0, 0, 128, 255 ]
import { loadLeague } from "@sportsdataverse/sdvplot";
import { passArcLayer } from "@sportsdataverse/sdvplot/deckgl";
await loadLeague("soccer");
// France's first completed pass of the 2018 World Cup final (StatsBomb open data through SPADL, metres from the
// corner); France is ESPN soccer team 478
const pass = { team: "478", start_x: 54.68750000000001, start_y: 6.375, end_x: 56.4375, end_y: 1.2750000000000057 };
const props = passArcLayer([pass], {
x: "start_x",
y: "start_y",
xend: "end_x",
yend: "end_y",
team: "team",
league: "soccer",
idSystem: "team_id",
tilt: 90,
});
// in the browser: new ArcLayer({ ...props, coordinateSystem: "cartesian" })
props.data[0]?.sourceColor;
Tags: docstring · passArcLayer. All sdvplot examples.