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

scattergl markers rendering incorrectly with time series data #5970

Closed
nickmzero opened this issue Oct 4, 2021 · 6 comments
Closed

scattergl markers rendering incorrectly with time series data #5970

nickmzero opened this issue Oct 4, 2021 · 6 comments

Comments

@nickmzero
Copy link

Noticing some unexpected behavior with time series data using scattergl. The markers are rendering off the lines at seemingly regular intervals: (this example has ~800k points)
Screen Shot 2021-10-04 at 1 55 48 PM

Reproducible example
shows scatter and scattergl side-by-side with the same date values: https://codepen.io/nickmzero/pen/KKqLOGv
Screen Shot 2021-10-04 at 2 10 18 PM

After briefly playing around with the dates in the codepen, it seems like the markers fail to correctly render on the line unless there's a day between points.

@AlanJMac
Copy link

AlanJMac commented Jul 4, 2022

We have started to see this same behaviour on all browsers for certain MacBooks using the M1 chip.
A particular setup we have that exhibits this behaviour is a MacBook Air, OS Monterey 12.3.1, M1 chip.
It has also been seen on OS 12.3.2 and 12.4.

The scatter plots render fine, but the markers in scattergl plots render vertically.

This appears to be the same issue reported in the community forums:

The issue presents itself for scattergl plots with x-axis values greater than 2^24 (e.g. date values)
And can be confirmed by the following example: https://codepen.io/alanjmac/pen/jOzbMVw

Scattergl_Issue_MacM1

(Edit: I noticed that https://cdn.plot.ly/plotly-latest.js currently points to "plotly.js v1.58.5" so I have updated the codepen to use https://cdn.plot.ly/plotly-2.12.1.js instead - issue is still seen).

@chipkent
Copy link

Has this been resolved? Is there any plan to address it?

@jklimke
Copy link

jklimke commented May 15, 2023

For me this is also a quite big problem. Is there any idea how to fix this or maybe a workaround ?

@AlanJMac
Copy link

I'm not sure if there is a fix (I tried but it was beyond me) however the following workaround works for me in Chrome:

  • in Chrome browser, navigate to chrome://flags/ and search for "ANGLE graphics backend". From the dropdown box select "Metal". (Apparently Open GL has been deprecated in Mac and may contain driver bugs).
    image

  • in Chrome versions >= 109.0.5414.xx, ensure hardware acceleration is enabled: Go to Settings => System and toggle on "Use hardware acceleration when available". In earlier versions, an alternative workaround was to toggle this to off.

I was unable to find a similar workaround for Firefox.

@sqlAlchemyNoob2004
Copy link

has anybody got a workaround for this? seems like plotly doesn't plan to fix this.. do I need to refactor with a different library to handle users on newer macs?

@AlanJMac
Copy link

AlanJMac commented Jan 8, 2024

I can confirm this issue appears to be fixed with the latest plotly.js 2.28.0 release!
Many thanks for the solution!

Fix scattergl rendering bug on M1 mac devices [https://github.com//pull/6830],
with thanks to @justinjhendrick for the contribution!

Details of the problem + fix can be found in the similar reported issue: #6820

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants