Add bin highlighting feature to dotplot viewer #798
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.