swimlane / ngx-charts

:bar_chart: Declarative Charting Framework for Angular
https://swimlane.github.io/ngx-charts/
MIT License
4.28k stars 1.15k forks source link

Getting an error when loading tooltip animation #1410

Open RamiKhawaly opened 4 years ago

RamiKhawaly commented 4 years ago

Hi, After I updated my angular to version 9, the heatmap tooltip is not showing, and I get the following error: core.js:6189 ERROR TypeError: Cannot read property 'appendChild' of undefined at DefaultDomRenderer2.appendChild (platform-browser.js:1080) at BaseAnimationRenderer.appendChild (animations.js:515) at InjectionService.push../node_modules/@swimlane/ngx-charts/ivy_ngcc__/release/esm.js.InjectionService.appendComponent (esm.js:2208) at TooltipService.push../node_modules/@swimlane/ngx-charts/ivy_ngcc/release/esm.js.InjectionRegistery.injectComponent (esm.js:2279) at TooltipService.push../node_modules/@swimlane/ngx-charts/__ivy_ngcc/release/esm.js.InjectionRegistery.createByType (esm.js:2238) at TooltipService.push../node_modules/@swimlane/ngx-charts/__ivy_ngcc__/release/esm.js.InjectionRegistery.create (esm.js:2234) at esm.js:2642 at ZoneDelegate.invokeTask (zone-evergreen.js:399) at Object.onInvokeTask (core.js:41442) at ZoneDelegate.invokeTask (zone-evergreen.js:398)

The same code is working on production, where I still didn't upload the latest version!

farhan-ansari commented 4 years ago

i am getting similar below error on chrome and ie for ngx-charts v12.1.0, angular v9

core.js:4061 ERROR TypeError: Cannot read property 'appendChild' of undefined at DefaultDomRenderer2.push../node_modules/@angular/platform-browser/ivy_ngcc__/fesm5/platform-browser.js.DefaultDomRenderer2.appendChild (platform-browser.js:650) at BaseAnimationRenderer.push../node_modules/@angular/platform-browser/ivy_ngcc/fesm5/animations.js.BaseAnimationRenderer.appendChild (animations.js:237) at InjectionService.push../node_modules/@swimlane/ngx-charts/__ivy_ngcc/release/esm.js.InjectionService.appendComponent (esm.js:2208) at TooltipService.push../node_modules/@swimlane/ngx-charts/ivy_ngcc__/release/esm.js.InjectionRegistery.injectComponent (esm.js:2279) at TooltipService.push../node_modules/@swimlane/ngx-charts/ivy_ngcc/release/esm.js.InjectionRegistery.createByType (esm.js:2238) at TooltipService.push../node_modules/@swimlane/ngx-charts/__ivy_ngcc/release/esm.js.InjectionRegistery.create (esm.js:2234) at esm.js:2642 at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421) at Object.onInvokeTask (core.js:27950) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)

meraj-ahmed commented 3 years ago

I was getting this error with ngx-charts v12.1.0 and angular v9.1.10. ngx-charts v13.0.0 has angular 9 compatibility, so upgrading to that caused the error to disappear for me.