-
Notifications
You must be signed in to change notification settings - Fork 95
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
Initial zoom in Zoomer is incorrect #660
Conversation
ToniMarc1990
commented
Feb 22, 2024
- Clamp the plot coordinates to the axis range before querying the values for display
- Solves issue The Zoomer plugin has some problems when using the mouse wheel #636
+ Clamp the plot coordinates to the axis range before querying the values for display
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #660 +/- ##
============================================
- Coverage 48.08% 48.06% -0.02%
- Complexity 6220 6221 +1
============================================
Files 374 374
Lines 38309 38309
Branches 6117 6117
============================================
- Hits 18419 18415 -4
- Misses 18732 18735 +3
- Partials 1158 1159 +1 ☔ View full report in Codecov by Sentry. |
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.
Hi, welcome to chart-fx and thanks for following this up and providing a fix. I've only looked at the diff yet, but from that it looks good.
dataMin = axis.getValueForDisplay(minPlotCoordinate.getY()); | ||
dataMax = axis.getValueForDisplay(maxPlotCoordinate.getY()); | ||
dataMin = axis.getValueForDisplay(Math.min(axis.getHeight(), minPlotCoordinate.getY())); | ||
dataMax = axis.getValueForDisplay(Math.min(axis.getHeight(), maxPlotCoordinate.getY())); |
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.
dataMax = axis.getValueForDisplay(Math.min(axis.getHeight(), maxPlotCoordinate.getY())); | |
dataMax = axis.getValueForDisplay(Math.max(0, Math.min(axis.getHeight(), maxPlotCoordinate.getY()))); |
Is this sufficient or should it also clamp to >0
? That would probably the rarer case, but I don't see any fundamental reason for only limiting one direction.
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.
I thought about this case too and would say that it either never occurs or is rare.
I committed you suggested change :-).
Quality Gate passedIssues Measures |
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.
LGTM, thanks again for contributing.
Since #636 describes multiple problems, does this fix only one aspects or are they all caused by this root cause? Otherwise i'll investigate and update the issue.
@wirew0rm: Thanks for merging this fix. When is the next planned/unplanned release? We want to integrate ChartFX in our application and thus need this fix ASAP. |
@ToniMarc1990 we certainly can target a release soon. May I ask you for a favour: To highlight ChartFX's versatility and advocate for continuing public support, we would like to gather user stories, applications, and companies without implying any endorsement or financial commitment from said author/company/team. Would you/your company be willing to contribute by sharing:
Your input will be invaluable in showcasing real-world applications and securing resources for ChartFX's growth. The primary purpose is to highlight the many diverse applications of ChartFX and the JavaFX eco-system in general and to demonstrate how we use public resources to benefit not only GSI/FAIR but also industry and academia alike. There are many nay-sayers who claim that engaging with the public costs more than it benefits -- which we'd like to dispel. We are aware that being the first in any list is always the hardest. Thus, we would first collect public support from about a dozen companies/institutes before setting up a sub-page. Please reach out on our matrix channel or via [email protected] if you prefer. N.B. The matrix channel is also a good place to get in contact with the other ChartFX developers in a more timely and inclusive manner. |
@RalphSteinhagen : We are interested in sharing information about us and the usage of ChartFX in our product. I forwarded the inquiry to my manager. |
@ichaus-we have the same request: You seem to be using ChartFX in an industrial context. Would your company be willing to share details about its domain, example applications/screenshots, and be mentioned (Logo, Name) as one of the libs users? This would help us a lot with building a strong(er) user base and long-term maintenance commitment. Thanks in advance for your consideration. |