Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vincent15000's avatar

Laravel charts

Hello,

I have some charts in an application.

I wanted to add a chart to display data on the dashboard, but ... strange ... the chart doesn't display.

Instead of displaying the chart, I just have a loading spinner.

I have checked all arrays / values passed to Laravel charts and all is ok.

I even tried several tests to check some hypothesis :

  • A is the dashboard chart and doesn't display correctly on the dashboard

  • B is another page chart and does display correctly on the other page

  • A on the other page doesn't display correctly

  • B on the dashboard displays correctly

What do you suggest me to check ?

Thanks a lot for your help.

V

0 likes
7 replies
jlrdw's avatar

If the data is generating, see if you have an element with display:none (hidden) that you need to un-hide for display.

Just sounds like a CSS problem.

2 likes
vincent15000's avatar

@jlrdw The div inside which the chart is displayed appears on the screen, but is empty, there is just a spinner in the center of the div, spinner loaded by the chart itself (it's not my spinner).

chiefguru's avatar

@vincent15000 if charts A and B have the same data structure, then swap that data, this will tell you if it's your data at fault or perhaps your chart structure.

Another avenue would be to grab the sample data from the chart package and switch out your data, this will pretty much tell you the same thing.

2 likes
vincent15000's avatar

@jlrdw @chiefguru Sorry ... I just forgot to add {!! $chart->script() !!} at the end of the blade file.

The worst is that I search for the solution for 2 weeks.

3 likes

Please or to participate in this conversation.