question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

1.0.2 - devicePixelRatio causes `responsive:true` to result in the wrong size (growing chart)

See original GitHub issue

When the browser has a devicePixelRatio, a CSS height and width are defined on the canvas. The physical height of the element (clientHeight) is determined by this height. When the resize method runs, it updates the canvas.height property to resize the element. If the device’s devicePixelRatio is greater than 1, what that means is that the height is set to a value greater than it should be set.

The net result is that resizing the element causes it to grow on each resize event.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
KristopherWagnercommented, Apr 21, 2017

I experience this issue in version 2.5.0

2reactions
tiwari-abhishekcommented, Dec 22, 2018

still exists in 2.7.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Window.devicePixelRatio - Web APIs | MDN
The devicePixelRatio of Window interface returns the ratio of the ... sizes: the size of one CSS pixel to the size of one...
Read more >
Why does increasing the devicePixelRatio decrease the size ...
This is exactly what hapenned in your case - increasing DPR to 2 leads to smaller image on screen because your application still...
Read more >
Adapting to a change in screen size and device pixel ratio
I have a scene with a full screen GUI that displays strangely if I move the window from my retina laptop screen (devicePixelRatio:...
Read more >
Support different pixel densities - Android Developers
Use density-independent pixels. The first pitfall you must avoid is using pixels to define distances or sizes. Defining dimensions with pixels ...
Read more >
Device Pixel Ratio - Matomo Plugins Marketplace
Reverted the change of 1.0.2, as the reason turned out to be a bug in Matomo core ... Pie chart now the default...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found