Skip to content

Type Alias: PlotHighlight ​

PlotHighlight = "boolean" | "subset" | Exclude<CustomPreset, "members"> | Partial<Record<MarkKind, HighlightRule>> | ((context) => void)

Defined in: plots/registered.ts:218

How a plot shows a selection from another view, in one of three modes:

  • 'boolean': the whole mark;
  • 'subset' (the default): the mark drawn again with the subset's value through the plot's own encoding, on the channel inferred from the geometry; or, per mark family, a declared channel, e.g. { rect: { mode: 'subset', channel: 'length', axis: 'y', anchor: 'end' } };
  • custom: a ready-made preset for every family ('glyph', 'trace') or per family ({ point: { mode: 'custom', preset: 'glyph' } }), or a function that draws the parts. trace draws the leading fraction of a line, or of the outline of a filled mark; members is only per family, with the scale of its marks (declared, returned by draw, or inferred).

Released under the MIT License.