Link:https://www.primefaces.org/primeng/#/chart/bar As given in the above link i tried giving code in .ts and html . And i have installed chart.js and primeng and m getting this error.
Can't bind to 'data' since it isn't a known property of 'p-chart'.
"): ng:///AppModule/BarComponent.html@1:20 'p-chart' is not a known element: 1. If 'p-chart' is an Angular component, then verify that it is part of this module. 2. If 'p-chart' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. (" [ERROR ->]
Can't bind to 'data' since it isn't a known property of 'p-chart'. If 'p-chart' is an Angular component and it has 'data' input, then verify that it is part of this module. If 'p-chart' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule. schemas' of this component to suppress this message.
This error often means that you haven't declared the directive "x" or haven't imported the NgModule to which "x" belongs. Perhaps you declared "x" in an application sub-module but forgot to export it. The "x" class isn't visible to other modules until you add it to the exports list.
Can't bind to 'show' since it isn't a known property of 'ngx-loading'. If 'ngx-loading' is an Angular component and it has 'show' input, then verify that it is part of this module. If 'ngx-loading' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.
have you tried to import the ChartModule to your project?:
Import this:
import { ChartModule } from 'primeng/chart';
and add this to your imports:
imports: [
ChartModule
]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With