2
hey there i checked your code and it works fine maybe you did not include jquery
try adding this before adding the charts cdn
<script src="https://code.jquery.com/jquery-3.4.1.js"></script>
i have added a fiddle as an example for you to reference please check
https://jsfiddle.net/og3xy7mb/1/
Source:stackexchange.com