3π
β
Can you please try with below code?
sample-chart.component.html
<div style="display: block;">
<canvas
baseChart
[datasets]="barChartData"
[labels]="barChartLabels"
[options]="barChartOptions"
[plugins]="barChartPlugins"
[legend]="barChartLegend"
[chartType]="barChartType"
>
</canvas>
</div>
You are forgot to add display block div. Can you please try with this in your chart.component.html
Source:stackexchange.com