Chartjs-How to make label always visible on DoughnutChart.js

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

Leave a comment