Skip to content
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

Detect zoom events #525

Open
jfredsilva opened this issue Mar 19, 2025 · 3 comments
Open

Detect zoom events #525

jfredsilva opened this issue Mar 19, 2025 · 3 comments
Labels

Comments

@jfredsilva
Copy link

Hi,

I'm working on a chart with the zoom option enable, I need an event to detect when the user zoomed.
By googling I found that we can setExtremes to have a callback fired.

I'm not understanding how can I get the Highcharts.AxisSetExtremesEventCallbackFunction called, how can I use it.

Thanks for the help.

AAChartModel added a commit that referenced this issue Mar 20, 2025
@AAChartModel
Copy link
Owner

Refer to this commit:

You can find the code in the dev branch of the AAChartKit-Swift demo.

@AAChartModel
Copy link
Owner

If this example in the demo runs and tests successfully, you will be able to see the following printout in the Xcode console:

🔍🔍🔍-------------------------------------------------------------------------------------------
 Chart zoom detected!
 message = {
        min: 2.1209302325581394,
        max: 2.7209302325581395,
    };
 🔍🔍🔍-------------------------------------------------------------------------------------------


 🔍🔍🔍-------------------------------------------------------------------------------------------
 Chart zoom detected!
 message = {
        min: 0.0,
        max: 0.0,
    };
 🔍🔍🔍-------------------------------------------------------------------------------------------

@jfredsilva
Copy link
Author

It worked, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants