-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using Angular 17 and can't find NgChartsModule so i'cant import #2000
Comments
I also had the same issue. For Angular 17, it would be best if you install ng2-charts version 5.0.4. |
Hi @KrisnaDhira |
For anyone stumbling accross this, I struggled after migrating from Angular 14 to 18, ng-charts 4 to 6. I could not make the The trick for me was to do as @madieukhang said, and import the BaseChartDirective instead of NgChartsModule in my (sub) module. But then no scales etc. were detected by chart.js. Looked in NgChartsModule... so just add the following lines in your (sub) module:
I have no idea if this is a desired way, at least it works. Maybe someone of the devs can help? |
... after playing around, I finally found out: in your sub-module just add:
The docs mislead me with the standalone component... |
Thanks for the info. It worked. |
Anybody looking at this using nx and wondering why it's not working, try |
Reproduction of the problem
ng2-charts is a port & modification of Chart.js component for Angular 2. Sometimes the issue is related with Chart.js instead of ng2-charts.
To confirm, if the issue shows in a pure Chart.js project, it is a issue of Chart.js.
Pure Chart.js starting template: https://jsfiddle.net/Hongbo_Miao/mvct2uwo/3/
If the issue does not show in a pure Chart.js project, and shows in a ng2-charts project, please try to provide a minimal demo of the problem.
ng2-charts starting template: http://plnkr.co/edit/Ka4NXG3pZ1mXnaN95HX5?p=preview
The text was updated successfully, but these errors were encountered: