Check Edges of Tooltip on "retina" displays #31

Closed
whatadewitt opened this Issue Mar 3, 2014 · 1 comment

Comments

Projects
None yet
2 participants

Hey,

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.

--d

Owner

Regaddi commented Mar 4, 2014

Hi,

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