最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

angular - What triggers initialization of my eChart - Stack Overflow

programmeradmin3浏览0评论

I have a MasterDetail component and in the detail I have an eChart (ngx-echarts). The master component triggers (for whatever reason, I'm not interested in right now) around 500 change detection cycles, which takes around three seconds.

In a subcomponent of the detail component (eChartponent) the chartOptions are created in ngOnInit. After around 500 ms, eChartponent.ngAfterViewInit() is executed. This however, does not initialize the eChart. Only when most of the 500 change detection cycles have finished, the eChart dares to initialize and show itself.

I know, that I can easily force the initialization, when I set the chartOptions in eChartponent.ngAfterViewInit. So my issue is not to find a solution.

I would like to understand what triggers the eChart to eventually initialize itself. I checked for resize-Events and for ngOnChanges call, but the do not happen.

发布评论

评论列表(0)

  1. 暂无评论