Skip to content Skip to sidebar Skip to footer

Chartjs Shows Up And Disappears

So I am using ChartJS alongside a Bootstrap 4 and Laravel Project. The code is fine(see below). Every time I refresh the page, the chart shows up for like a millisecond and goes aw

Solution 1:

I had the same issue. The problem was from the defer loading of the app.js in the layout.

<scriptsrc="{{ asset('js/app.js') }}"defer></script>

It was loading after my and a Vue instanciation was created. I think this is why the chart was disappearing.

I hope it helps someone.

Solution 2:

The solution which was working for me:

  • Remove async and defer from app.js

<script async src="{{ asset('js/app.js') }}" defer></script>

Post a Comment for "Chartjs Shows Up And Disappears"