fxcosta / laravel-chartjs

Simple package to facilitate and automate the use of charts in Laravel 5.x using Chartjs v2 library
485 stars 113 forks source link

Drawing PieChart issue #34

Closed FredLopes0203 closed 7 years ago

FredLopes0203 commented 7 years ago

Line chart works well. But bar chart and piechart doesn't work. I inputted code as your example code. But nothing appeared. I got this error...

Chart.min.js:11 Uncaught TypeError: Cannot read property 'length' of null at n (Chart.min.js:11) at new t.Controller (Chart.min.js:11) at new t (Chart.min.js:12) at dashboard:84 at dashboard:91 n @ Chart.min.js:11 t.Controller @ Chart.min.js:11 t @ Chart.min.js:12 (anonymous) @ dashboard:84 (anonymous) @ dashboard:91

Please help me

pjeutr commented 7 years ago

What version of Chart.js are you using? Think I saw this coming by when I started. And it went away using the latest 2.4.0 Chart.js

FredLopes0203 commented 7 years ago

I'm using 2.4.0. And I've noticed that, sometimes also line chart occurs same error. But I can't expect the reason....

pjeutr commented 7 years ago

saw some of the same issues at chartjs, can you reproduce it with js in a fiddle? probably a timing problem.

Just tried the example, without problems. And I am using 2 piecharts in my project

fxcosta commented 7 years ago

@FredLopes0203 if u need, reopen this issue, thanks!