]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Clarify interaction docs to indicate they apply to all interactions (#8537)
authorEvert Timberg <evert.timberg+github@gmail.com>
Sun, 28 Feb 2021 00:46:58 +0000 (19:46 -0500)
committerGitHub <noreply@github.com>
Sun, 28 Feb 2021 00:46:58 +0000 (02:46 +0200)
* Clarify interaction docs to indicate they apply to all interactions

* Update note on modes documentation to indicate interaction options exist

* Fix ytpo

docs/docs/configuration/interactions/index.md
docs/docs/configuration/interactions/modes.md

index 7e37780b127b107efa1077db9f57df9e6fc8c583..6b94f168e17a7fbaa1eb6ad8559f58135caaaa2e 100644 (file)
@@ -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.
index fe7e21fcf177451619ce68c6a981990622e35d38..bfd989f25bc41f2163318fae124c4bea7ba7dec9 100644 (file)
@@ -2,7 +2,7 @@
 title: Interaction Modes
 ---
 
-When configuring interaction with the graph via 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.