Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bars disappear with devicePixelRatio less than 1 #982

Closed
DTupalov opened this issue Jan 21, 2022 · 0 comments · Fixed by #986
Closed

Bars disappear with devicePixelRatio less than 1 #982

DTupalov opened this issue Jan 21, 2022 · 0 comments · Fixed by #986
Assignees
Labels
bug Unexpected problem or unintended behavior.
Milestone

Comments

@DTupalov
Copy link

Lightweight Charts Version: 3.3.0 (but reproduce in latest 3.7.0)

Steps/code to reproduce:

On high resolution displays zooming out to 33% bars on chart will disappear.
On low resolution displays need zooming out only to 90% for disappearing bars.

Open example with bars in jsfiddle, and scale browser's zoom out to 90% or 33% (depends from display resolution)

Most people with basic displays, some of them can open pages with little scaling, and in this case they can't see bars on chart.

I suppose, that it depends on devicePixelRatio and thinness of bar item, but maybe there is some workaround? Maybe we can increase bars width, if devicePixelRatio < 1

Actual behavior:

Bars disappears

Expected behavior:

Bars not disappears

Screenshots:

With 33% zoomimg (on macbook with retina display):
image

With 50% zooming (on macbook with retina display):
image

CodeSandbox/JSFiddle/etc link:

  1. Open - https://jsfiddle.net/TradingView/v0p52anL/
  2. Zoom to 90% or 33% (depends)
  3. Bars will disappear
@timocov timocov added the bug Unexpected problem or unintended behavior. label Jan 24, 2022
@timocov timocov changed the title [Bug?] Bars disappear with browser scaling <100% Bars disappear with browser scaling <100% Jan 24, 2022
@timocov timocov changed the title Bars disappear with browser scaling <100% Bars disappear with devicePixelRatio less than 1 Jan 24, 2022
@timocov timocov self-assigned this Jan 24, 2022
@timocov timocov added this to the 3.8 milestone Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants