Chartjs-Chart.js not showing when i try to format dates

1πŸ‘

βœ…

to solve the issue i had to reverse the sequence of the script tags:
from:

<script src="/static/ChartJS/2.7.2/Chart.min.js"></script>
<script src="/static/moment/2.22.2/moment.js"></script>

to

<script src="/static/moment/2.22.2/moment.js"></script>
<script src="/static/ChartJS/2.7.2/Chart.min.js"></script>

if someone can provide me an explanation, i would be greatful.

1πŸ‘

It works fine for me.

There issue is your json variable is split into multiple lines. Connect them into one line or change it to a multiline string with backticks.

Fiddle of your own code working here: https://jsfiddle.net/efq6wnhm/1/

This fiddle is using Chart.js 2.7.3 linked here: https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js

Leave a comment