ngx-echarts icon indicating copy to clipboard operation
ngx-echarts copied to clipboard

angular 6 using echart rxjs problem

Open sihanwang94 opened this issue 6 years ago • 6 comments

ERROR TypeError: rxjs_Observable__WEBPACK_IMPORTED_MODULE_1__.Observable.of is not a function at ChangeFilter.push../node_modules/ngx-echarts/ngx-echarts.es5.js.ChangeFilter.notEmpty (ngx-echarts.es5.js:28) at NgxEchartsDirective.push../node_modules/ngx-echarts/ngx-echarts.es5.js.NgxEchartsDirective.ngOnChanges (ngx-echarts.es5.js:103) at checkAndUpdateDirectiveInline (core.js:10101) at checkAndUpdateNodeInline (core.js:11371) at checkAndUpdateNode (core.js:11333) at debugCheckAndUpdateNode (core.js:11970) at debugCheckDirectivesFn (core.js:11930) at Object.eval [as updateDirectives] (SolutionChartComponent.html:2) at Object.debugUpdateDirectives [as updateDirectives] (core.js:11922) at checkAndUpdateView (core.js:11315)

html:

component: ngOnInit() { const xAxisData = []; const data1 = []; const data2 = [];

  for (let i = 0; i < 100; i++) {
    xAxisData.push('category' + i);
    data1.push((Math.sin(i / 5) * (i / 5 - 10) + i / 6) * 5);
    data2.push((Math.cos(i / 5) * (i / 5 - 10) + i / 6) * 5);
  }

  this.options = {
    legend: {
      data: ['bar', 'bar2'],
      align: 'left'
    },
    tooltip: {},
    xAxis: {
      data: xAxisData,
      silent: false,
      splitLine: {
        show: false
      }
    },
    yAxis: {
    },
    series: [{
      name: 'bar',
      type: 'bar',
      data: data1,
      animationDelay: function (idx) {
        return idx * 10;
      }
    }, {
      name: 'bar2',
      type: 'bar',
      data: data2,
      animationDelay: function (idx) {
        return idx * 10 + 100;
      }
    }],
    animationEasing: 'elasticOut',
    animationDelayUpdate: function (idx) {
      return idx * 5;
    }
  };
}

sihanwang94 avatar Nov 01 '18 00:11 sihanwang94

@sihanwang94 Did you update ngx-echarts to latest version?

xieziyu avatar Nov 11 '18 12:11 xieziyu

Hello.

I have the last version of ngx-echarts and the same problem.

Any idea? Thanks !

MatiasChao avatar Dec 28 '18 16:12 MatiasChao

@MatiasChao Please double check if your rxjs is 6.0 or higher.

xieziyu avatar Jan 04 '19 06:01 xieziyu

Hello, how are you?

My version is :

package.json

"rxjs": "^6.3.3", "rxjs-compat": "^6.3.3",

Thanks


De: Xie, Ziyu [email protected] Enviado: viernes, 4 de enero de 2019 3:42 Para: xieziyu/ngx-echarts Cc: Matuss; Mention Asunto: Re: [xieziyu/ngx-echarts] angular 6 using echart rxjs problem (#145)

@MatiasChaohttps://github.com/MatiasChao Please double check if your rxjs is 6.0 or higher.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/xieziyu/ngx-echarts/issues/145#issuecomment-451364445, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGwUegVm4oewhGPqxUrnxC71zOtKD3G0ks5u_vfngaJpZM4YFlQE.

MatiasChao avatar Jan 04 '19 13:01 MatiasChao

Any ideas? Thanks

MatiasChao avatar Jan 08 '19 17:01 MatiasChao

@MatiasChao Could you setup a demo github repo to reproduce this issue?

xieziyu avatar Jan 09 '19 04:01 xieziyu