From 22e02e7bbb2dd94fe22a56d1beefa0710dc017d3 Mon Sep 17 00:00:00 2001 From: Evert Timberg Date: Sat, 27 Feb 2021 17:42:34 -0500 Subject: [PATCH 1/3] Clarify interaction docs to indicate they apply to all interactions --- docs/docs/configuration/interactions/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/configuration/interactions/index.md b/docs/docs/configuration/interactions/index.md index 7e37780b127..6b94f168e17 100644 --- a/docs/docs/configuration/interactions/index.md +++ b/docs/docs/configuration/interactions/index.md @@ -6,8 +6,8 @@ Namespace: `options.interaction`, the global interaction configuration is at `Ch | 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. +| `mode` | `string` | `'nearest'` | Sets which elements appear in the interaction. See [Interaction Modes](modes.md#interaction-modes) for details. +| `intersect` | `boolean` | `true` | if true, the interaction 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. -The same options can be set into the `options.hover` namespace, in which case they will only affect the hover effect and the tooltip configuration will be kept independent. +By default, these options apply to both the hover and tooltip interactions. The same options can be set in the `options.hover` namespace, in which case they will only affect the hover interaction. Similarly, the options can be set in the `options.plugins.tooltip` namespace to independently configure the tooltip interactions. From 848c912fb5b27395b49f2d5f40bccb2a5c221be4 Mon Sep 17 00:00:00 2001 From: Evert Timberg Date: Sat, 27 Feb 2021 18:37:25 -0500 Subject: [PATCH 2/3] Update note on modes documentation to indicate interaction options exist --- docs/docs/configuration/interactions/modes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/configuration/interactions/modes.md b/docs/docs/configuration/interactions/modes.md index fe7e21fcf17..c20c1a84772 100644 --- a/docs/docs/configuration/interactions/modes.md +++ b/docs/docs/configuration/interactions/modes.md @@ -2,7 +2,7 @@ title: Interaction Modes --- -When configuring interaction with the graph via hover or tooltips, a number of different modes are available. +WWhen configuring the interaction with the graph via `interaction`, `hover` or `tooltips`, a number of different modes are available. `options.hover` and `options.plugins.tooltip` extend from `options.interaction`. So if `mode`, `intersect` or any other common settings are configured only in `options.interaction`, both hover and tooltips obey that. From 4c425f6f24b61b9cf99e7daeceaef12d9f80331f Mon Sep 17 00:00:00 2001 From: Evert Timberg Date: Sat, 27 Feb 2021 19:04:48 -0500 Subject: [PATCH 3/3] Fix ytpo --- docs/docs/configuration/interactions/modes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/configuration/interactions/modes.md b/docs/docs/configuration/interactions/modes.md index c20c1a84772..bfd989f25bc 100644 --- a/docs/docs/configuration/interactions/modes.md +++ b/docs/docs/configuration/interactions/modes.md @@ -2,7 +2,7 @@ title: Interaction Modes --- -WWhen configuring the interaction with the graph via `interaction`, `hover` or `tooltips`, a number of different modes are available. +When configuring the interaction with the graph via `interaction`, `hover` or `tooltips`, a number of different modes are available. `options.hover` and `options.plugins.tooltip` extend from `options.interaction`. So if `mode`, `intersect` or any other common settings are configured only in `options.interaction`, both hover and tooltips obey that.