10 months ago

Laravel Charts - Not Loading

Posted 10 months ago by nickdavies07

I seem to be having difficulties in getting my charts to display without a hard refresh (ctrl+shift+r).

I'm using the ConsoleTVs/Charts Laravel package with the Chart.js chart set.

I have included the <script src="{{ asset('js/Chart.min.js') }}"></script> in my <head> and below that I have the scripts loading for the charts {!! $chartA->scripts() !!} and {!! $chartB->scripts() !!}

The charts show sporadically though; most of the time they need a hard refresh to show.

I have added version() to my webpack file for the chart.min.js script to prevent it from being cached i.e. mix.js('resources/js/Chart.min.js', 'public/js').version(); but still no luck.

Any advice?

Here's an example of what's happening:- Demo

Please sign in or create an account to participate in this conversation.