Documentation / @ripl/charts / applySegmentInteraction
Function: applySegmentInteraction() ​
applySegmentInteraction<
TElement,TPayload>(element,options):void
Defined in: charts/src/core/interaction.ts:245
Wires a chart segment's full hover treatment: the tooltip and highlight transition of applyHoverHighlight, plus the typed enter/leave/click events and the chart-wide highlight every segmented chart emits alongside them.
Type Parameters ​
| Type Parameter | Description |
|---|---|
TElement extends Element<Partial<BaseState>, ElementEventMap> | The element type the hover is attached to. |
TPayload extends InteractionPoint | The chart's interaction event payload. |
Parameters ​
| Parameter | Type | Description |
|---|---|---|
element | TElement | The segment element to make interactive. |
options | Omit<HoverHighlightOptions, "onEnter" | "onLeave" | "onClick"> & HoverHighlightStates<TElement> & SegmentInteractionOptions<TPayload> | The hover treatment, together with the events the segment reports. |
Returns ​
void