Documentation / @ripl/charts / HoverHighlightOptions
Interface: HoverHighlightOptions<TElement>
Defined in: charts/src/core/interaction.ts:36
Options describing how an element should respond to hover.
Type Parameters
| Type Parameter |
|---|
TElement extends Element |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
anchor? | () => object | Resolves the tooltip anchor point (called on enter). | charts/src/core/interaction.ts:57 |
animation | () => object | Resolves the highlight/restore transition timing lazily, at hover time. Resolving on each hover (rather than baking a value in when the handler is bound) keeps navigator-driven animation suppression from freezing the hover into an instant snap. | charts/src/core/interaction.ts:44 |
content? | () => string | Resolves the tooltip content (called on enter). | charts/src/core/interaction.ts:64 |
highlight | StateOf<TElement> | Target state applied while hovered. | charts/src/core/interaction.ts:51 |
onClick? | (point) => void | Called when the element is clicked, with the pointer position. | charts/src/core/interaction.ts:70 |
onEnter? | (point) => void | Called when the pointer enters the element, with the current pointer position. | charts/src/core/interaction.ts:66 |
onLeave? | (point) => void | Called when the pointer leaves the element, with the last known pointer position. | charts/src/core/interaction.ts:68 |
renderer | Renderer | Renderer used to run the highlight/restore transitions. | charts/src/core/interaction.ts:38 |
restore | StateOf<TElement> | Target state applied when the pointer leaves. | charts/src/core/interaction.ts:53 |
tooltip? | HoverTooltip | Optional tooltip to show/hide alongside the highlight. | charts/src/core/interaction.ts:55 |