swimlane / ngx-charts

:bar_chart: Declarative Charting Framework for Angular
https://swimlane.github.io/ngx-charts/
MIT License
4.28k stars 1.15k forks source link

ngx-charts as a component #1604

Open chaitanya1248 opened 3 years ago

chaitanya1248 commented 3 years ago

I was trying to use ngx-charts-bar-vertical in an Angular 10 app. The charts work fine as long as I use them in app.component. But When I try to implement the same inside another component or page, I get following errors:

Can't bind to 'view' since it isn't a known property of 'ngx-charts-bar-vertical'.

These errors repeat for each input property.

Steps to reproduce the behavior:

  1. Implement any ngx-charts component inside a component.
  2. Check the logs for errors

ngx-charts should be allowed to be used within any component outside of app.component.

ngx-charts version 17.0.1

Similar to: https://github.com/swimlane/ngx-charts/issues/195

Zoraiyo commented 3 years ago

Hello,

I think the problem is that ngx-charts 17.x is not compatible with Angular 10 (marked as breaking change in changelog.md) . Consider to upgrade your project to angular 11 or try to use ngx-charts 16.x.