Skip to content

Documentation / @ripl/charts / SegmentInteractionOptions

Interface: SegmentInteractionOptions<TPayload> ​

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

How a segment reports its hover to the chart around it: the typed event it emits and the chart-wide highlight it drives.

Type Parameters ​

Type ParameterDescription
TPayload extends InteractionPointThe chart's interaction event payload, which carries the pointer position.

Properties ​

PropertyTypeDescriptionDefined in
onClick?(event) => voidEmits the chart's click event for the segment.charts/src/core/interaction.ts:226
onEnter?(event) => voidEmits the chart's enter event for the segment.charts/src/core/interaction.ts:222
onHighlight?(hovered) => voidToggles the chart-wide highlight for the hovered segment, called with true on enter and false on leave. Charts whose segments are already solid at rest use it so the hover reads as the other segments dimming rather than this one lifting.charts/src/core/interaction.ts:232
onLeave?(event) => voidEmits the chart's leave event for the segment.charts/src/core/interaction.ts:224
payloadOmit<TPayload, "x" | "y">The event's pointer-independent fields; x/y are filled in from the pointer per event.charts/src/core/interaction.ts:220