13π
β
To make the pie chart smaller, set responsive
property to false
in your chart options, like so β¦
var options = {
...
responsive: false,
...
}
1π
In var ctxPTD = $("#myChart2").get(0).getContext("2d");
, you could use a HTML DOM element, not a jQuery element, and set height only like:
var ctxPTD = document.getElementById("myChart2");
ctxPTD.height = 200;
Hope it works.
Source:stackexchange.com