[Chartjs]-Angular 12 + Chartjs 3.3.2 TypeError: Cannot read property 'left'

2👍

The issue seems to be in your import of Chart. You are trying to display a bar chart but it has not been imported. You will need to import BarElement also. A shorter way to test if your chart is getting rendered or not is to only import the following:

import Chart from 'chart.js/auto';

You can refer to the integration section of chart.js docs to understand what could have been missing or here is a sample stackblitz.

Leave a comment