highlight
import * as Plot from "@observablehq/plot";
import { highlight } from "@sportsdataverse/sdvplot/interact";
import { linkIds } from "@sportsdataverse/sdvplot/plot";
const rows = [
{ team: "KC", wins: 15, pf: 385 },
{ team: "BUF", wins: 13, pf: 525 },
{ team: "MIA", wins: 8, pf: 345 },
];
const svg = Plot.plot({ marks: [Plot.dot(rows, { x: "wins", y: "pf", r: 6, render: linkIds(rows, "team") })] });
const missing = highlight(svg, new Set(["KC", "SEA"])); // ["SEA"]: no SEA dot here; BUF and MIA dim
svg;
Tags: docstring · highlight. All sdvplot examples.