Ngx-charts: ERROR TypeError: Object(...) is not a function for base-chart.component.ts (bindWindowResizeEvent)

Created on 27 Jul 2018  路  4Comments  路  Source: swimlane/ngx-charts

I'm submitting a ... (check one with "x")

  • [x] bug report - search github for a similar issue or PR before submitting
  • [ ] feature request
  • [ ] support request - use StackOverflow (add the ngx-charts tag) or the gitter chat for support questions

Current behavior

I have managed to get the Line Chart working however encounter the following error on Browser Console:

core.js:1449 ERROR TypeError: Object(...) is not a function
    at LineChartComponent../src/common/base-chart.component.ts.BaseChartComponent.bindWindowResizeEvent (index.js:7837)
    at LineChartComponent../src/common/base-chart.component.ts.BaseChartComponent.ngAfterViewInit (index.js:7749)
    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 execEmbeddedViewsAction (core.js:14153)
    at checkAndUpdateView (core.js:13845)
    at callViewAction (core.js:14195)
defaultErrorLogger @ core.js:1449
ErrorHandler.handleError @ core.js:1510
(anonymous) @ core.js:5925

Please tell us about your environment:

Angular CLI: 1.7.4
Node: 10.1.0
OS: darwin x64
Angular: 5.2.11
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router

@angular/cdk: 5.2.5
@angular/cli: 1.7.4
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.9.2
webpack: 3.12.0
  • Browser: [Chrome XX | Firefox XX ]

Most helpful comment

Resolved the issue after downgrading to "@swimlane/ngx-charts": "^7.3.0" for Angular 5.2 version.

All 4 comments

What is the version of your @swimlane/ngx-charts ?

Maybe is the same problema at #847 or #834

@ganobrega v^9.0.0"

Resolved the issue after downgrading to "@swimlane/ngx-charts": "^7.3.0" for Angular 5.2 version.

Was this page helpful?
0 / 5 - 0 ratings