From 15782895b06fd629e9a645981bf27303bc6a1164 Mon Sep 17 00:00:00 2001 From: sbosse Date: Mon, 21 Jul 2025 23:34:54 +0200 Subject: [PATCH] Mon 21 Jul 22:43:21 CEST 2025 --- js/ui/chart/docs/general/interactions/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 js/ui/chart/docs/general/interactions/README.md diff --git a/js/ui/chart/docs/general/interactions/README.md b/js/ui/chart/docs/general/interactions/README.md new file mode 100644 index 0000000..9b5ad6d --- /dev/null +++ b/js/ui/chart/docs/general/interactions/README.md @@ -0,0 +1,10 @@ +# Interactions + +The hover configuration is passed into the `options.hover` namespace. The global hover configuration is at `Chart.defaults.global.hover`. To configure which events trigger chart interactions, see [events](./events.md#events). + +| Name | Type | Default | Description +| ---- | ---- | ------- | ----------- +| `mode` | `string` | `'nearest'` | Sets which elements appear in the tooltip. See [Interaction Modes](./modes.md#interaction-modes) for details. +| `intersect` | `boolean` | `true` | if true, the hover mode only applies when the mouse position intersects an item on the chart. +| `axis` | `string` | `'x'` | Can be set to `'x'`, `'y'`, or `'xy'` to define which directions are used in calculating distances. Defaults to `'x'` for `'index'` mode and `'xy'` in `dataset` and `'nearest'` modes. +| `animationDuration` | `number` | `400` | Duration in milliseconds it takes to animate hover style changes.