chartjs-plugin-crosshair
chartjs-plugin-crosshair copied to clipboard
Tooltips not showing if data is sorted descending on the x axis
When the dataset data is not sorted ascending by x value the interpolation does not work.
https://codepen.io/danmana/pen/mdVPbEb?editors=1010
Interpolate assumes the data is sorted ascending when searching for the matching index on hover. https://github.com/AbelHeinsbroek/chartjs-plugin-crosshair/blob/master/src/interpolate.js#L31
If making this work with desc data complicates things too much, we should at least document this behavior.