Ngx-charts: Ngx: 3.0.2 not working : ng2d3 charts not working after upgrade to latest

Created on 24 Dec 2016  路  9Comments  路  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 => Please do not submit support request here

Current behavior
I updated ng2d3 (earlier) to "ngx-charts": "^3.0.2" and charts stopped working after that. Bar, Line, area, etc used to work effortlessly before but now they aren't. Please tell me what's missing in my installation steps.

Reproduction of the problem

  1. npm install ngx-charts --save
  2. npm i @swimlane/ngx-datatable --save
  3. Included all the dependencies like
  4. this in app.module.ts: import { NgxChartsModule } from 'ngx-charts';
  5. modified the template from <bar-vertical to <ngx-charts-bar-vertical like below:
    <ngx-charts-bar-vertical [view]="view" [scheme]="colorScheme" [results]="single" [gradient]="gradient" [xAxis]="showXAxis" [yAxis]="showYAxis" [showXAxisLabel]="showXAxisLabel" [showYAxisLabel]="showYAxisLabel" [xAxisLabel]="xAxisLabel" [yAxisLabel]="yAxisLabel" (select)="onSelect($event)">

Error:
```Unhandled Promise rejection: Template parse errors:
Can't bind to 'view' since it isn't a known property of 'ngx-charts-bar-vertical'.

  1. If 'ngx-charts-bar-vertical' is an Angular component and it has 'view' input, then verify that it is part of this module.
  2. If 'ngx-charts-bar-vertical' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message.
    ("

    [ERROR ->][view]="view"
    [scheme]="colorScheme"
    [results]="single"
    "): DashboardComponent@16:20```

Please tell us about your environment:

  • Mac
  • Webstorm
  • ngx-charts version: "^3.0.2",

  • Angular version: "2.2.1"

Most helpful comment

Hi @marjan-georgiev, tried running it with https://github.com/Teradata/covalent and it worked. Thrilled for our collaboration.

Thanks,
Teradata UX member

All 9 comments

try npm i @swimlane/ngx-charts --save - needs to be namespaced to @swimlane

Thanks for replying @marjan-georgiev. I tried this but still get the same error:
```Unhandled Promise rejection: Template parse errors:
Can't bind to 'view' since it isn't a known property of 'ngx-charts-bar-vertical'.

  1. If 'ngx-charts-bar-vertical' is an Angular component and it has 'view' input, then verify that it is part of this module.
  2. If 'ngx-charts-bar-vertical' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message.
    ("

    [ERROR ->][view]="view"
    [scheme]="colorScheme"
    [results]="single"
    "): DashboardComponent@16:20```

I am following this: https://swimlane.gitbooks.io/ngx-charts/content/charts/bar-vertical.html

Is there any other dependency or file which I need to modify and is not included? Is angular version fine?
FYI: all this used to work with previous install.

Did you include the NgxCharts module?

Ah, just noticed the angular version. ngx-charts 3.x depends on angular 2.4.

Ah, cool. Am positive that is the issue. Gonna update now, Thanks 馃憤

@richavyas any luck with the update? I am using the angular cli beta 24 and 2.4.1 and I am still not able to get it to work. Any luck

I can confirm that the updated documentation @marjan-georgiev did, and the https://swimlane.gitbooks.io/ngx-charts/content/intro/installing.html I was able to get a working sample in angular cli and angular 2.4.1. you can take a look at my work in progress on https://github.com/daBishMan/ngx-material

This issue is closed for me, thank you so much for the quick response.

Great!

Hi @marjan-georgiev, tried running it with https://github.com/Teradata/covalent and it worked. Thrilled for our collaboration.

Thanks,
Teradata UX member

Was this page helpful?
0 / 5 - 0 ratings

Related issues

emeric0101 picture emeric0101  路  3Comments

amcdnl picture amcdnl  路  4Comments

DZDomi picture DZDomi  路  4Comments

tobigit picture tobigit  路  4Comments

jvbianchi picture jvbianchi  路  4Comments