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

axes range not working. Range is +-1, data is 0->1.6e10 #6896

Open
28raining opened this issue Feb 14, 2024 · 3 comments
Open

axes range not working. Range is +-1, data is 0->1.6e10 #6896

28raining opened this issue Feb 14, 2024 · 3 comments

Comments

@28raining
Copy link
Contributor

28raining commented Feb 14, 2024

codepen

there should be 2 points visible in that plot, but there are none.
Comment out the range to see the 3 points

@alexcjohnson
Copy link
Collaborator

Thanks @28raining - I see 2 points, for you it's just blank?
Screenshot 2024-02-14 at 21 33 46
What browser/version/OS are you on?
@archmoj what does it look like for you?

@28raining
Copy link
Contributor Author

ha, you are right! It only doesn't work in Safari.

Chrome:
image

Safari:
image

Safari Version 17.3 (19617.2.4.11.8), Intel MacOs 14.3

@alexcjohnson
Copy link
Collaborator

Ah! Yep, missing for me too in Safari. Even weirder, when I start dragging one of the ends of the axis, very often the points appear, then they disappear again on mouseup, until I get to a range of ~500 then they stay visible.

So feels to me like this is a bug in Safari's SVG rendering engine, some optimization when the total coordinate range on the plot is very large (the off-screen point is translated up 2159999999865 pixels!) that it stops doing when things get more complicated (in this case, while dragging the end of the axis we apply a scale transform to the points).

We could try to work around this bug by restricting the number of pixels we'll try to shift; that should be fine for markers, but we'll have to be careful if we do this for lines, so that they keep the correct angle while shooting off-screen, so we'd need to constrain x and y together in a smart way.

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

No branches or pull requests

3 participants