1π
β
Or you could forget about jquery leave the <head></head
as was in the code you posted and substitute
var context = $('#chart').get(0).getContext('2d');
with
var context = document.getElementById("chart").getContext("2d");
1π
You just have to include this line in your html file to include jquery
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
0π
In the code above seems to miss the ref to jquery
between <head></head>
tags
Source:stackexchange.com