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 args for initial ranges to RangeToolLink #5800
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5800 +/- ##
==========================================
- Coverage 88.14% 88.13% -0.02%
==========================================
Files 307 307
Lines 62863 62897 +34
==========================================
+ Hits 55413 55434 +21
- Misses 7450 7463 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just some suggestions for refactoring.
one quirk - when you press the 'reset' button in the Bokeh toolbar, users would probably expect the plot to go back to the initial state that was displayed with constrained rangetool bounds... However, upon 'reset', the rangetool currently fills the whole data space. I don't think this should block this PR.. just to note for a future enhancement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small comments. That definitely are not blockers.
Thank you for the PR. Great job! |
fixes #5437
This PR allows users to specify a start and end to the axes ranges in the call to RangeToolLink. Previously, this required a hook (#5437).
Why? Users often need to adjust the initial selection range to have the target plot focused on a subregion, rather than having the entire data range on view at the start. Often, the view of the entire dataset is less useful for initial exploration than a particular focused region, while the entire range still needs to be available for easy pan and zoom navigation. The improvement in this PR will also be helpful for future developments for particularly large amounts of data, where we could set an absolute limit on the viewport range and limit the out-of-viewport data sent to the browser, to prevent crashes or slowdowns. This PR therefore addresses the immediate utility of focused navigation and sets the stage for further developments with large data.
update: changed args and logic to boundsx/y rather than axes_start/end