-
Notifications
You must be signed in to change notification settings - Fork 43
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
Set limit range for zoom, scroll, and adjust operations #427
Conversation
Set limit range for zoom, scroll, and adjust operations - Added a method `setLimitRange` to define minimum and maximum range boundaries for dynamic axis operations. - Enforced these limits in `zoomIn`, `zoomOut`, `scrollUp`, `scrollDown`, and `adjustRange` to ensure axis values stay within the specified range. - Updated logic in these methods to respect `minRange` and `maxRange`. - Added checks to prevent invalid configurations for `minRange` and `maxRange`. This change does not affect manual range updates via `setRange` to provide flexibility for custom settings.
@QuocDoBV Please adjust the year in the header. If it was |
Your approach allows to specify a range manually. That's also a way to select a range of display.
|
I am using InteractiveChart. Does it suport RangeRestriction? I checked and saw that InteractiveChart does not support RangeRestriction. Could you please confirm? Thank you. |
The |
We are building a view that is using InteractiveChart for plot data. We would like to limit zoom, scroll, adjust in specified range. But InteractiveChart does not support a RangeRestriction. It is the reason why I want to make these changes. Our application is using InteractiveChart for plotting data. Because there are a set different between InteractiveChart and chart extensions(line chart is simiar to Interactive chart for plotting line series) such as context menu item, slider, etc,... Therefore I still want to use InteractiveChart instead of an extension. |
When using |
Thank you for your suggestion. |
@QuocDoBV Have a look at the demo chart I just have pushed. |
@QuocDoBV Did you try it with the above example? |
I have just run your example. It looks great. I will continue checking the compatibility of the ScrollableChart extension with my project tomorrow. Thank you so much for your suggestion. |
Lovely to hear. Additionally, your PR could be used in a case, where chart zooming shall be constrained to a defined range. If you'd like to, please update the header accordingly. I would then merge the change and adjust it slightly to the ChartSettings approach. |
Updated the copyright headers in the modified files to include the year range 2023, 2024
I have just updated the header file as your request. |
Hi @eselmeister, |
@QuocDoBV Please move the above mentioned issue to a separate issue. I will do a review. |
@QuocDoBV The PR looks good, but the copyright header was updated in a wrong way. You need to fix it. The first year marks the year the file has been created. The second year the year the file has been updated recently. In this case, you replaced 2008 by 2023. The correct header is:
Please adjust the header. |
Thank for your explanation! |
Set limit range for zoom, scroll, and adjust operations
setLimitRange
to define minimum and maximum range boundaries for dynamic axis operations.zoomIn
,zoomOut
,scrollUp
,scrollDown
, andadjustRange
to ensure axis values stay within the specified range.minRange
andmaxRange
.minRange
andmaxRange
.This change does not affect manual range updates via
setRange
to provide flexibility for custom settings.