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

Add bin highlighting feature to dotplot viewer #798

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

johnarban
Copy link
Collaborator

@johnarban johnarban commented Feb 5, 2025

Introduce a bin highlighting tool and integrate it into the dotplot viewer, allowing users to toggle bin visibility for enhanced data analysis.

The BinHighlighter uses the selection_layer to get the current mouse position and display a histogram bin. This involves passing a message back to the server (which I think we wanted to prevent).

The one issue remaining in it is - after zooming in, the bin highlight becomes pale (like it is placed behind a layer). if the mouse is moved quickly enough before the dotplot reorders the layers, it comes up alright.

image

In general, because of how small our bins are, I am not sure really how useful this tool would be

I made a little solara app for testing it here:
https://github.com/johnarban/test_highlight. In this repo is also an attempt at doing all of the highlighting client side (using javascript loaded in to the app). however, this would need to somehow be rerun everytime plotly rerendered, and I am not sure how to do that.

@patudom
Copy link
Contributor

patudom commented Feb 6, 2025

I wrote the notes for #799 without reading your comment on this PR first, so I didn't realize that this works using messaging. I can say that @heywooddogwood and I both like the bin highlighter a lot, and I think we should be using fewer, wider bins, anyway, which would make the bin highlighter especially helpful. Also, we prefer the lighter gray highlight that you get when you're zoomed in.

But if there isn't an easy way to make this happen client-side, then maybe we will need to live without this functionality. Do @Carifio24 or @nmearl have ideas?

@johnarban
Copy link
Collaborator Author

Yes, so https://github.com/johnarban/test_highlight/blob/master/test_highlight/components/PlotlyHighlighting.vue in that linked repo, starts to get highlighting working. I think it can work, if it can get rerun each time the plot is re-rendered. I have an idea, but we'll see

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

Successfully merging this pull request may close these issues.

2 participants