Chartjs-TypeError: Cannot read properties of null (reading 'length').What does it mean?

0👍

Problem was with template.
I forgot write correct id for canvas.
It must be so:

<canvas id="main-chart" height="400"></canvas>

0👍

The property length is for Array, the error say it’s not possible read of null (important that word "null") of legth, so the problem is that the const or var with that property become null for any reason.

Leave a comment