Interface: LinkSelectionOptions<Row, Datum>
Defined in: packages/sdvplot/src/interact/link.ts:22
What linkSelection wires to a store: one figure and/or one table.
Type Parameters
Row
Row
Datum
Datum = unknown
Properties
figure?
optionalfigure?:Element
Defined in: packages/sdvplot/src/interact/link.ts:27
The figure whose marks carry data-sdv-id: what Plot.plot returns (stamped by linkIds), or a d3-drawn <svg>
with its own stamps.
hover?
optionalhover?:boolean| {id: (datum) =>unknown; }
Defined in: packages/sdvplot/src/interact/link.ts:35
How the figure writes hover. true (the default): the stamped mark under the pointer (mouseover). false: it
writes nothing, for a figure another writer hovers. { id }: the datum Plot's own tip/pointer picks, the
nearest within its maxRadius, published as the figure's value with an input event; id maps it to a link id
(null clears). Pass figure as Plot.plot returned it: with a caption or legend that is a <figure>, and only the
figure hears input. Anything else throws InputError, in Node too.
select?
optionalselect?:"toggle"
Defined in: packages/sdvplot/src/interact/link.ts:48
"toggle": each stamped mark of figure becomes a checkbox (role, tabindex="0", aria-checked kept in step
with the store), and a click, Enter or Space toggles its id in selected. Each checkbox keeps the mark's own
accessible name: name the marks through Plot's ariaLabel channel (ariaLabel: "matchup", an aria-label) or its
title channel (a <title>); a mark with neither is named by its link id until teardown. Throws InputError when
a mark sits in an <a href>: a checkbox inside a link is nested interactive content with two tab stops; and, with
a DOM, when the figure already has a live toggle link, whose click would then toggle twice (tear it down first).
On a Plot figure with a tip, a click also pins Plot's tip; give the tip pointerEvents: "none" so the pinned tip
never takes a click meant for a mark under it.
table?
optionaltable?:LinkableTable<Row>
Defined in: packages/sdvplot/src/interact/link.ts:37
A createTable engine: useTable().table, or the one passed to hydrate.