ReferenceError: Chart is not defined - chartjs

后端 未结 6 1289
孤独总比滥情好
孤独总比滥情好 2021-02-05 08:45

Is there a bug with Chart.js? Every time I add any of the graphs at Chart.js to my website I get an error, but when I used the graph as stand-alone program it runs smoothly with

6条回答
  •  故里飘歌
    2021-02-05 09:13

    here is a workding jsfiddle of your code:
    new Chart(rice).Line(riceData);
    http://jsfiddle.net/mahmalsami/jqcthmyo/
    So the problem is definitively coming from your external Chart.min.js inclusion

    You may find a 404 on your js get. Please make sure you're linking to the correct js folder. (try accessing your localhost/Chart.min.js to see if you can access to your file)

提交回复
热议问题