Replies: 1 comment
-
Lightweight Charts doesn't provide an API for manually controlling the device pixel ratio for the chart. Depending on the browser in use, you may not need to do anything to get the behaviour you are looking for. Some browsers seem to compensate and the result is still crisp. You can manually change the const normalRatio = window.devicePixelRatio; // only get this value once on page load.
// zoomed in to 200%, therefore double the pixel ratio
window.devicePixelRatio = 2 * normalRatio;
chart.resize(
800, // width
600, // height
true // force repaint
); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
is there a way to do this? the primary reason being to map the charts bars 1:1 to the screens resolution. One example is the user zooming the browser in and out. The text will be adjusted to the zoom, but we want to keep the chart bars pixel perfect
Beta Was this translation helpful? Give feedback.
All reactions