Skip to content

Documentation / @ripl/charts / applyHoverHighlight

Function: applyHoverHighlight() ​

applyHoverHighlight<TElement>(element, options): void

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

Wires consistent hover behavior (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 & HoverHighlightStates<TElement>

Returns ​

void