-
Notifications
You must be signed in to change notification settings - Fork 117
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
Subsequent render() events are called outside angular. #360
Comments
Any idea what might cause that, I'm not that familiar with |
I presume Highcharts' events should be patched by We only used In our situation, we need to remove some chart data after it has been rendered and notify the outside. Because this is happening outside the Angular zone, changes made to angular components aren't picked up by the framework until the next lifecycle hook is called. |
The idea behind the However, you can create the chart outside of Angular and then the update through the reference is performed in the Angular zone- demo. |
My apologies for my late reply; Ill try to get you a semi-functional demo or at least an example as soon as I can. The update I need to make has to be inside Angular's change detection so it will be applied at the correct time. Therefore, creating the chart outside Angular would not solve the problem at hand. |
That would be great if you can prepare a demo of what you are trying to do ;) |
I've minimized how many chart options are actually used to help isolate the issue at hand. Our example is as such:
|
Thank you for the demo and details about your use case! If you use the PS I was not fully able to run your demo which is why I've created a separate one. |
I see that I made a mistake in my stackblitz, which I need to fix. However, all calls to Highcharts.render should be inside or outside angular, respective of the runOutsideAngular option. |
Describe the bug
The initial chart render is run inside angular, while subsequent calls to
chart.render()
are run outside angular.This can cause problems with async updates in components.
Expected behavior
All calls to
render()
are run inside angular, unless[runOutsideAngular]="true"
Demo
Stackblitz
Steps required to recreate the problem in the demo:
console.log(NgZone.isInAngularZone())
Setup used
etc.
The text was updated successfully, but these errors were encountered: