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

Hover box overlapping point/cursor #5097

Open
johann-petrak opened this issue Aug 24, 2020 · 4 comments
Open

Hover box overlapping point/cursor #5097

johann-petrak opened this issue Aug 24, 2020 · 4 comments
Labels
bug something broken P3 backlog

Comments

@johann-petrak
Copy link

With plotly express, when using hover_data, the hover box sometimes covers the point for which it is shown (depending on the size of the hover box). It would be good if this could get avoided by shifting the box. In many cases, it is clear before showing the plot, in which direction the hoever box could get shifted to better avoid this, so even if the javascript cannot figure this out automatically it would be good to allow something like "hover_box_delta_x", "hover_box_delta_y" to shift the box that many pixels to the right (if negative, to the left), for example.

When the box completely covers the cursor and the point it is shown for it is very hard to put the information in context and even harder to show the information for another point, because neighbouring points are not visible at all.

@nicolaskruchten
Copy link
Contributor

Can you provide a reproducible example of when this happens please?

@johann-petrak
Copy link
Author

The zip file contains a Jupyter notebook where the second scatter plot shows this behaviour.
This notebook also demonstrates the problem described in issues plotly/plotly.py#2476 and #4294

In issue #4294 you will also find a notebook that demonstrates how the same is done with hvplot: it shows all overlapping data points in the hover information and it breaks the text to avoid points getting covered by the hover box.

plotly_scatter_hover1.zip

@gvwilson
Copy link
Contributor

Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson

@johann-petrak
Copy link
Author

This is still a very important problem, I do not think that it should be closed just because nobody addressed it for a rather long time.

In my case it influenced my decision to use Bokeh instead for several projects where close or multiple identical points are an issue and plotly basically shows extremely incomplete and thus misleading information. I think others have commented about this problem also somewhere on the plotly discussion forums.

@gvwilson gvwilson self-assigned this Jun 26, 2024
@gvwilson gvwilson reopened this Jun 26, 2024
@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson added bug something broken P3 backlog labels Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog
Projects
None yet
Development

No branches or pull requests

3 participants