You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a scatter plot with 2 data sets, when hovering cursor over data point the hover behaviour should be for that single point, and the label showing the data points should be for that single point as well.
Current Behavior
When hovering over a data point, the hover behaviour happens for that data point and the corresponding data point in the second data set. The label is halfway between those two data points, and has the data for both points on it.
Thanks, that fixed it. I hadn't tried, didn't see that in the docs - looks like it's an issue with the 'index' mode, 'nearest' and 'point' seem to do what I'd expect
I think the scatter chart is inheriting the line defaults which use index mode. If there's a time to change the default mode, it's now before v3 releases
That makes sense - seems a sensible default for line charts with multiple datasets, but it isn't how I'd expect scatter charts to behave in the multiple dataset case, personally at least
https://codepen.io/chrisjdavie/pen/RwobexW
Expected Behavior
In a scatter plot with 2 data sets, when hovering cursor over data point the hover behaviour should be for that single point, and the label showing the data points should be for that single point as well.
Current Behavior
When hovering over a data point, the hover behaviour happens for that data point and the corresponding data point in the second data set. The label is halfway between those two data points, and has the data for both points on it.
Possible Solution
Steps to Reproduce
https://codepen.io/chrisjdavie/pen/RwobexW
Hover the cursor over a data point. (using https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.0.0-beta.9/chart.min.js. Also tested with latest master on one of the sample charts)
Context
I am trying to plot a scatter plot with two data sets, where you can hover a cursor over a point, and have the data displayed as a label.
Environment
(Thanks for looking at this, I'm really enjoying using Chart.js, charting is straightforward, once I figure out how to do things in JS)
The text was updated successfully, but these errors were encountered: