Skip to main content

focusIds

{
  "idle": null,
  "focus": [
    "KC",
    "BUF"
  ]
}
import { createSelection, focusIds } from "@sportsdataverse/sdvplot";

const store = createSelection();
const idle = focusIds(store.getState()); // null: draw everything normally
store.set({ selected: ["KC"], hover: ["BUF"] });
({ idle, focus: [...(focusIds(store.getState()) ?? [])] });

Tags: docstring · focusIds. All sdvplot examples.