4👍
✅
Because the item you are drawing is larger than 400 pixels, this is actually a bug in ChartJS. The current Alpha of ChartJS 2.0.0 addresses and fixes this problem. The segmentStrokeWidth
is not taken into account when drawing the chart on the canvas, that causes the it to be larger than the canvas.
A fix for this version would be to subtract the outerRadius
of your graph by half the stroke width:
var strokeWidth = 5;
var options = {
animation: true,
segmentStrokeWidth : strokeWidth
};
...
myNewChart = new Chart(ct).Doughnut(data, options);
myNewChart.outerRadius -= (strokeWidth/2);
Source:stackexchange.com