Check Edges of Tooltip on "retina" displays #31

whatadewitt opened this Issue Mar 3, 2014 · 1 comment


None yet
2 participants


I'm working with a MacBook Pro with "retina" display, so the screen DPI is 2. This was causing some problems with the "check edges" on the tooltips, so I made the following change...

// check edges
if(posX + rectWidth > ctx.canvas.width / window.devicePixelRatio) {
  posX -= posX+rectWidth-ctx.canvas.width / window.devicePixelRatio;

Solved the issue for me. Not the cleanest solution, but it may be worth including down the road.



Regaddi commented Mar 4, 2014


a proper solution would be the following:

  1. Save the retina-width within the Chart.js scope in a variable
  2. Use the variable instead of ctx.canvas.width

@Regaddi Regaddi closed this in 868557a Mar 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment