swimlane / ngx-graph

Graph visualization library for angular
https://swimlane.github.io/ngx-graph
MIT License
922 stars 285 forks source link

Is there anyway to run the graph outside of the ngZone? #523

Open labeled opened 9 months ago

labeled commented 9 months ago

Is your feature request related to a problem? Please describe. I'm looking to prevent the graphs mouse events from triggering change detection in the angular zone change detection life cycle.

Describe the solution you'd like I'd like to instantiate the graph outside of the Angular zone. Using something like I do here with Plotly.

constructor(private zone: NgZone) { }

ngOnInit() {
 this.zone.runOutsideAngular(() => Plotly.newPlot('chart', data));
}