Skip to content

Documentation / @ripl/charts / applyHoverHighlight

Function: applyHoverHighlight()

applyHoverHighlight<TElement>(element, options): void

Defined in: charts/src/core/interaction.ts:84

Wires consistent hover behaviour (highlight transition + optional tooltip) onto an element. Safe to call repeatedly on the same persistent element across renders — prior listeners are disposed first so handlers never accumulate.

Type Parameters

Type Parameter
TElement extends Element<Partial<BaseState>, ElementEventMap>

Parameters

ParameterType
elementTElement
optionsHoverHighlightOptions<TElement>

Returns

void