6๐
In your HTML template, you should replace [chartType]="barChartType"
by [type]="barChartType"
.
For further information, please consult Chart types from
ng2-charts
documentation.
- [Chartjs]-How to show multiple values in point hover using chart.js
- [Chartjs]-Chart.js Bar graph with percentage values
3๐
We need to use "type" instead of "chartType".
The below code works
<div style="display: block;">
<canvas baseChart
[datasets]="barChartData"
[labels]="barChartLabels"
[options]="barChartOptions"
[plugins]="barChartPlugins"
[legend]="barChartLegend"
**[type]**="barChartType">
</canvas>
</div>
- [Chartjs]-How to add padding to the vertical scale (X-axis) in Chart.js?
- [Chartjs]-Chart js 2 how to set bar width
Source:stackexchange.com