2👍
✅
Based on the supplied fiddle in your comment, but not on your question, you had a few problems:
- You had HTML
<script>
tags in theJavaScript
section of the fiddle. - You were loading
Chart.js
with<script type="text/javascript" src="chart.js/Chart.js"></script>
, where there is nochart.js/Chart.js
on JSFiddle (alsomyjs.js
doesn’t not exist on their servers). - You had
var skillsChart = new Chart(context).Pie(data);
before yourpieData
array, and not after. var skillsChart = new Chart(context).Pie(data);
should have beenvar skillsChart = new Chart(context).Pie(pieData);
as your array is calledpieData
, notdata
.
See this fiddle.
Hope this helped! 🙂
Source:stackexchange.com