Chart.js/docs/general/interactions
Jukka Kurkela f5437fe548 Fix nearest interaction mode to return all items (#5857)
Return all items that are at the nearest distance to the point and add unit tests for nearest + axis: 'x' and nearest + axis: 'y'
2018-11-27 16:26:41 +01:00
..
events.md Consistent use of punctuation and quick review in docs (#5796) 2018-11-02 08:46:06 +01:00
modes.md Fix nearest interaction mode to return all items (#5857) 2018-11-27 16:26:41 +01:00
README.md Consistent use of punctuation and quick review in docs (#5796) 2018-11-02 08:46:06 +01:00

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.

Name Type Default Description
mode String 'nearest' Sets which elements appear in the tooltip. See 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.