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

[Chrome + IE] Tooltip not displaying where the cursor is for Bar Graph (got shifted to the right)

Open BuddyNote opened this issue 10 years ago • 3 comments

screen shot 2016-02-10 at 1 03 24 pm

The red dot is where my cursor is, but the tooltip is displaying for the 3rd bar. This issue only happens to Chrome and IE, but not for other web browers (Safari, Firefox). I just use the default options for my Bar graph, not specifying any extra options at all. I am also using MetisMenu, displaying on the left side, I suspected this could cause the displacement (as the cursor seems to be shifted to the right), however, I removed the Side Menu and the problem persists.

Any help is greatly appreciated.

BuddyNote avatar Feb 10 '16 02:02 BuddyNote

@BuddyNote can you drop this in a JSFiddle if possible? I think the issue is related to some padding / margin not being taken into account when converting the mouse event to canvas coordinates.

etimberg avatar Feb 10 '16 02:02 etimberg

I have tried to replicate the same issue in jsfiddle, but since I have a number of js and css files, it is quite hard to upload them to jsfiddle as they are not supporting uploading multiple files. So I tried with Plunker

http://plnkr.co/edit/fboW97pwTFUhSFzjEa3Y?p=preview

I could just try to attach the zipped folder of the webpage (including the js and css required - bootstrap, jquery, chart.js, etc) but it's not professional.

I keep thinking it has to do with my code yet I cannot figure out why is it working for Firefox and not Chrome.

BuddyNote avatar Feb 10 '16 05:02 BuddyNote

Fixed in #2073

etimberg avatar Feb 28 '16 20:02 etimberg