DEV Community

Discussion on: Use Laravel charts in Laravel.

Collapse
 
philipiree profile image
philipiree

chart:26 Uncaught TypeError: Cannot read property 'getContext' of null. I have followed all the steps but the error shows this in console var
ctvChart = document.getElementById('hamlwzcyqxfksvupbergjdnto').getContext('2d');

Collapse
 
arielmejiadev profile image
Ariel Mejia

There is a chance to view the code to get more context?

Collapse
 
philipiree profile image
philipiree

Hi, thank you so much for your reply! The problem was the CDN. I have put this instead and it worked!

Thread Thread
 
arielmejiadev profile image
Ariel Mejia

Great! is difficult to get this bugs because there are not code bugs, cool

Collapse
 
arielmejiadev profile image
Ariel Mejia

Many developers talk me about Laravel charts package inconsistence so I decide to write my own package to provide a similar solution with easy api, you can read about it here: dev.to/arielmejiadev/create-charts...