xieziyu / ngx-echarts

An angular (ver >= 2.x) directive for ECharts (ver >= 3.x)
https://xieziyu.github.io/ngx-echarts/
MIT License
1.11k stars 197 forks source link

echart 4.0 支持? #63

Open laozhuorun opened 6 years ago

laozhuorun commented 6 years ago

echart 4.0 支持?

laozhuorun commented 6 years ago

组件销毁的时候报错 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'style' of undefined TypeError: Cannot read property 'style' of undefined at TooltipContent.hide (:62890:17) at ExtendedClass.dispose (:63561:30) at :25239:19 at Array.forEach () at each$1 (:488:13) at ECharts.echartsProto.dispose (:25238:5) at NgxEchartsDirective.webpackJsonp.../../../../ngx-echarts/ngx-echarts.es5.js.NgxEchartsDirective.ngOnDestroy (dashboard.module.chunk.js:1573) at callProviderLifecycles (vendor.bundle.js:157653) at callElementProvidersLifecycles (vendor.bundle.js:157614) at callLifecycleHooksChildrenFirst (vendor.bundle.js:157597) at TooltipContent.hide (:62890:17) at ExtendedClass.dispose (:63561:30) at :25239:19 at Array.forEach () at each$1 (:488:13) at ECharts.echartsProto.dispose (:25238:5) at NgxEchartsDirective.webpackJsonp.../../../../ngx-echarts/ngx-echarts.es5.js.NgxEchartsDirective.ngOnDestroy (dashboard.module.chunk.js:1573) at callProviderLifecycles (vendor.bundle.js:157653) at callElementProvidersLifecycles (vendor.bundle.js:157614) at callLifecycleHooksChildrenFirst (vendor.bundle.js:157597) at resolvePromise (polyfills.bundle.js:7833) at resolvePromise (polyfills.bundle.js:7797) at polyfills.bundle.js:7882 at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (polyfills.bundle.js:7433) at Object.onInvokeTask (vendor.bundle.js:149651) at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (polyfills.bundle.js:7432) at Zone.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask (polyfills.bundle.js:7200) at drainMicroTaskQueue (polyfills.bundle.js:7606) at

image

xieziyu commented 6 years ago
  1. echarts4.0是支持的,只要echarts本身的API兼容3.0的配置模型,ngx-echarts就能支持4.0;
  2. 这个销毁问题和echarts本身有关联,ngx-echarts在destroy的时候,仅仅是调用了dispose方法,有可能是它的这个方法出现了兼容性问题,需要进一步调查
purlintan commented 6 years ago

我也遇到这个问题。什么时候可以修改一下呢? echarts 3.8.4版本是OK的。