-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Incorrect height of coloured px.timeline bars #2684
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
Comments
Thanks for reporting this, it is indeed a case which should be handled internally! |
We have a fix for this and it'll hopefully be released this week! |
I'm still seeing this issue in 4.10. To clarify, I'm not seeing it with the data set in the original issue but I do see it with my own data set, which I cannot share. |
OK, thanks for letting us know. If you're able to share a minimum reproducible example I'd be happy to follow up but as far as I can tell this issue should be resolved. Just to confirm: if you're seeing this in JupyterLab, can you confirm you've upgraded the |
I'm running in a jupyter notebook so I believe that extension doesn't apply. |
Ok, thanks for confirming; and indeed you're right in classic notebook no extension is needed. Any way for me to reproduce this would help :) does it always happen? To any random subset of the data? Any pattern to when it does/doesn't occur? Etc |
It does always happen. I can reproduce it consistently and between Python 3.7 and 3.8. I can't figure out a good subset of the data that it happens on, nor a pattern of when it does or does not occur. I've attached my data (complete_data.csv.txt). Here's the code I'm running in jupyter:
Here's an image of what I see: This is in a clean virtualenv, so I'm using the latest version of everything, so plotly 4.10.0 at the time of writing. |
Ah, awesome, thanks so much for boiling this down for us! What's happening here is that your Y axis here is being interpreted as a linear axis rather than a categorical one (per the recently-documented auto-detection behaviour). You can override this by calling Changing this auto-detection for stringified numbers is something I'm considering changing in a 5.0 release of Plotly.py :) |
Ah I'm fairly new to plotly so I wasn't aware of this behaviour. Calling that function does indeed solve my problem. Sorry for the false alarm and thanks again for your help. |
It's pretty weird behaviour so I don't blame you ;) The underlying Javascript engine hews to JS conventions which is to treat stringified numbers as numbers in many contexts. |
@eduedix if you could create a new issue and include some reproducible code, that would let me help you most effectively. Please ensure you're on the latest version of the |
Hello, |
In 4.9.0, the following code:
is giving me
where the rows coloured red have the wrong height. Perturbing the order seems to help things, in particular sorting by status.
Looking at the sizes of the bars and the underlying json makes me wonder if when it's overlaying the two, it's scaling everything independently, and forgetting that B is even there:
If so, faking nondisplayable rows should help, and it seems to:
which also seems to fix my production case, but preferably would be handled on the plotly side. :-)
The text was updated successfully, but these errors were encountered: