Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

The mouseover problem of doughnut chart demo

Open ardenliu opened this issue 12 years ago • 3 comments

On http://www.chartjs.org, When I moved mouse over the label from outside, mouseover function did show tooltip of the doughnut chart. The following is the video to show this problem: https://www.youtube.com/watch?v=uBUq7b3jfRg

ardenliu avatar Oct 25 '14 19:10 ardenliu

Got it working. Example: http://jsbin.com/titewa/1/edit?html,js

The problem is actually when you first mouse over the legend. If you approach the legend with the cursor from the top, bottom or left or right it won't highlight that portion of the doughnut graph. But once your in the legend it will work.

The problem is the isChange function variable (Side note: crappy coding if you ask me. Assign a variable an anonymous function? Really? come on.... But it's alright it was just annoying trying to debug it.)

Around lines 876-899. If you comment this function out and then set this.activeElements = ChartElements;

Mouse over events work completely.

Not sure what it does to the other graphs but it fixes the doughnut graph. The isChanged function doesn't seem to be necessary for the doughnut graph.

sweetgoals avatar Oct 31 '14 19:10 sweetgoals

Can we have a fix on this one?

kouts avatar Nov 13 '14 21:11 kouts

Site has been updated. This is no longer an issue

etimberg avatar May 04 '16 01:05 etimberg