Ngx-charts: observableFromEvent is not defined

Created on 23 May 2018  路  3Comments  路  Source: swimlane/ngx-charts

I'm submitting a ...

  • [x] bug report
  • [ ] feature request
  • [ ] support request

Current behavior

I copy the code from https://swimlane.gitbook.io/ngx-charts/v/docs-test/examples/line-area-charts/line-chart but when i launch it on my code i have this error

historics-auto-exercice.component.html:6 ERROR TypeError: Object(...) is not a function
    at LineChartComponent.BaseChartComponent.bindWindowResizeEvent (base-chart.component.js:113)
    at LineChartComponent.BaseChartComponent.ngAfterViewInit (base-chart.component.js:25)
    at callProviderLifecycles (core.js:12748)
    at callElementProvidersLifecycles (core.js:12715)
    at callLifecycleHooksChildrenFirst (core.js:12698)
    at checkAndUpdateView (core.js:13853)
    at callViewAction (core.js:14195)
    at execComponentViewsAction (core.js:14127)
    at checkAndUpdateView (core.js:13850)
    at callViewAction (core.js:14195)

When i debug the bindWindowResizeEvent method i found observableFromEvent is undefined.
So for tried i have had

import 'rxjs/add/observable/fromEvent';

on my component but the error always happen.

  • ngx-charts version: 8.0.1
  • Angular version: 5.2.11

  • Rxjs version: 5.5.10

  • Language: TypeScript 2.4.2

Most helpful comment

It may be related to #834: ngx-chart 8 should be used with angular 6 only, please try ngx-chart 7.4 for angular 5.

All 3 comments

It may be related to #834: ngx-chart 8 should be used with angular 6 only, please try ngx-chart 7.4 for angular 5.

@mnasyrov's suggestion fixed it for me

@mnasyrov Thank you, work for me too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

achimha picture achimha  路  3Comments

ronybarbosa picture ronybarbosa  路  3Comments

emeric0101 picture emeric0101  路  3Comments

stephanrauh picture stephanrauh  路  4Comments

DZDomi picture DZDomi  路  4Comments