Skip to content

Documentation / @finchart/dom / tooltip

Function: tooltip() ​

tooltip(options?): Plugin<OverlayHost & PlotEventSource & FormatSource & XCoordinates, ConfigurablePluginApi<TooltipOptions>>

Defined in: dom/src/tooltip.ts:51

Follows the cursor and shows the series values at that x.

DOM — this is the case that needs rich styling and text selection, at a count of one. The ingredients are all existing contracts: the crosshair event (position, data x, pane) + Pane.probe (values) + overlay.

ts
const tip = plot.use(tooltip({ formatX: dateLabel }));
tip.dispose();

Can't be installed on a headless chart (no overlay) — installation throws.

Parameters ​

options? ​

TooltipOptions = {}

Returns ​

Plugin<OverlayHost & PlotEventSource & FormatSource & XCoordinates, ConfigurablePluginApi<TooltipOptions>>