-
-
Notifications
You must be signed in to change notification settings - Fork 258
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
How can I detect if the tooltip is being shown? (I want to check for a deselect event) #496
Comments
Refer to this commit: |
However, using a timer to get the |
With the help of online AI tools, I found a better solution. |
You need to update the demo to see the all new code. |
That worked! The following code snippet is exactly what I wanted. .load("""
function() {
Highcharts.wrap(Highcharts.Tooltip.prototype, 'hide', function (proceed, delay) {
proceed.apply(this, Array.prototype.slice.call(arguments, 1));
window.webkit.messageHandlers.deselect.postMessage('Tooltip is being hidden');
});
}
""")) Thanks so much for the fast and helpful response! |
I see that this was an old Highcharts question here with the answer leading to this JSFiddle. However, I haven't found the way to check if the tooltip is hidden using AAChartKit-Swift. For my application, I use the basic and custom callbacks to pass data when the user selects points (using moveOverEventMessage in basic instances and .mouseOver(js injection) when I need to pass a custom object). This works great and it allows me to show chart details that are synchronized with the tooltip (awesome!). However, I'd like these details to disappear when the tooltip disappears so I need to know when the tooltip is showing or when the user deselects.
This is my initial attempt, but the callback doesn't fire when the tooltip is hidden:
Any help is appreciated, thank you!
The text was updated successfully, but these errors were encountered: