[Chartjs]-Wrong chart.js points get highlighted on hover

6👍

The maintainer of chartjs proposed the following solution:

by default the chart hover is for all items at the same index in the
datasets. You can change this by adding

hover: {
  mode: 'new mode'
}

to your config. If you set the mode to ‘x’ it will work as expected.
See https://codepen.io/anon/pen/aEjdeb All of the modes are documented
here: http://www.chartjs.org/docs/latest/general/interactions/modes.html

Works perfectly.

Here is the original post on github: https://github.com/chartjs/Chart.js/issues/5148#issuecomment-357515190

Leave a comment