-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Improve hover behavior for overlapping points in scatterplot #4294
Comments
Essentially a duplicate of #720 I think. |
I should add I am using Plotly Express and only 1 trace. |
Have you overcome the overlapping data problem? I am having the same problem. |
I am having the same problem |
The hvplot library does this much better and shows hover data for all identical data points. I think this is a serious issue to consider since it can easily hide important information when exploring data. One important question would be if hover data should be shown for all data points which have exactly identical x/y coordinates only or for all data points which are "very close" to the coordinate represented by the cursor position, i.e. within a small bounding box around the cursor position (I guess this is what "overlapping" means here). |
It's a good feature and we'd love to have it in the library but it's not on anyone's roadmap at the moment as far as I know. That said, we as maintainers would be happy to help someone from the community to implement it in Plotly.js, or to accept sponsorship to get it on to our short-term roadmap :) |
@johann-petrak what does hvplot do when there are e.g. 100 points under the cursor? is there some summarization option like "... and 98 other points" or something? I'd love to see a screenshot or get some sample code for that library so I can poke around :) |
Here is a zip file that contains a notebook which illustrates how hvplot does this: it creates a huge stack of hover boxes which exceed the vertical size of the viewable area inside a notebook. I think this happens because the notebook viewable area does not have a maximum height defined. If the same happens in a web page where the height is defined by the window size, I think the stack gets "broken" up into several side-by side stacks, but I do not know what happens if that would cover the whole area. I do not think they have some kind "overflow" options where any additional hover boxes would get summarized somehow. The notebook also illustrates how hvplot differs in how it shows hover information for long texts, which will cover the cursor/point shown in plotly but not in hvplot. |
Anyone have any pointers for how to implement a multihover to this? |
This issue has been tagged with A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort. Sponsorship range: $15k-$25k What Sponsorship includes:
Please include the link to this issue when contacting us to discuss. |
Sounds good. |
I was just doing a quick & dirty hack to set up my grafana dashboard, do you think the way I implement this seems suitable for merging (without option to show the last point only like before)? If so, I will definitely clean up the code with consistent code style. |
Well. This ticket is a feature not a bug. So I think it would be best to add a layout attribute to control this. |
Sure, maybe we need some discussion about naming? I can do this in the future when I have time. |
@ssine , can you share your solution |
Hi @alaafarahid89 , |
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 |
I believe this is basically the same as plotly/plotly.py#2476 ? And probably also the same as #5097 ? |
In my scatterplot I have multiple points that overlap. Each point has different data to it, and much of the hoverdata is unavailable.
Suggestion: an icon or number somewhere indicating that a point has overlapping data, perhaps coupled with onclick functionality that lets the user inspect all points (either in-graph, sub-plot, or in a table?).
The text was updated successfully, but these errors were encountered: