diff --git a/Chart.js b/Chart.js index 565d1aebcf9..09afaea0b8c 100755 --- a/Chart.js +++ b/Chart.js @@ -246,10 +246,12 @@ var Chart = function(context, tooltipOptions){ var yPosition = 0; while(e) { - xPosition += (e.offsetLeft - e.scrollLeft + e.clientLeft); - yPosition += (e.offsetTop - e.scrollTop + e.clientTop); + xPosition += (e.offsetLeft + e.clientLeft); + yPosition += (e.offsetTop + e.clientTop); e = e.offsetParent; } + xPosition -= window.pageXOffset; + yPosition -= window.pageYOffset; return { x: xPosition, y: yPosition }; }