-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Custom zoom configuration #1164
Comments
its not as important as a seperate x & y zoom but it would be nice if I could add a maximum and a minimum zoom level aswell as a log scale |
Yep, I'd benefit hugely from being able to make check boxes for |
This would be of great help to me too! Any ideas anyone? |
For my use case, I'd simply like to change zoom so it happens on regular scrolling, rather than ctrl + scrolling. A convenience method to zoom by a certain amount per each direction (around some centre point) would help me immensely, and would allow everyone to hook up whatever zooming behaviour they need. Sort of like the |
I opened a PR to address this issue. Any feedback would be appreciated. I included an example of how to customize the plot manipulation, but I am struggling with using Ctrl for scrolling instead of zooming. When Ctrl is down, the mouse Scroll event is automatically replaced by a Zoom event, so I don't know how to distinguish it from other Zoom events. If anyone knows of a way to get the mouse scroll delta regardless of modifier keys, that would be appreciated as well. |
<!-- Please read the "Making a PR" section of [`CONTRIBUTING.md`](https://github.com/emilk/egui/blob/master/CONTRIBUTING.md) before opening a Pull Request! * Keep your PR:s small and focused. * If applicable, add a screenshot or gif. * Unless this is a trivial change, add a line to the relevant `CHANGELOG.md` under "Unreleased". * If it is a non-trivial addition, consider adding a demo for it to `egui_demo_lib`. * Remember to run `cargo fmt` and `cargo clippy`. * Open the PR as a draft until you have self-reviewed it and run `./sh/check.sh`. * When you have addressed a PR comment, mark it as resolved. Please be patient! I will review you PR, but my time is limited! --> - Added methods to zoom the plot programmatically, to match the previously added `translate_bounds()`. - Added an example of how this method can be used to customize the plot navigation. Closes #1164.
Is your feature request related to a problem? Please describe.
Currently, the ctrl + scroll zooms in on both x and y axis at the same time, when trying to see granular candlestick data this is not ideal.
Describe the solution you'd like
It would be nice if I could add my own custom zoom logic, like regular scroll to zoom on the x axis, ctrl scroll to zoom on the y axis, etc.
Describe alternatives you've considered
Ive tried setting the bar width at a higher number, so that zooming would be unnecessary but its impossible to find a zoom level that works for every need
Additional context
Pretty much impossible to make any good use out of this chart with the current y axis zoom, only option is to zoom in on both axes and only view a small segment of the chart.
The text was updated successfully, but these errors were encountered: