11๐
โ
I think you did not define an animation. Try this example found at Chart.js documentation.
var scanedTodayChart = new Chart(scanedTodayChartCtx, {
type: 'pie',
data: {
labels: [
"Red",
"White",
],
datasets: [
{
data: [10, 100],
backgroundColor: [
"#DA1A32",
"#F0FFFF"
],
borderWidth: false,
borderColor: false
}]
},
options: {
cutoutPercentage: 90,
animation: {
duration: 2000,
onProgress: function(animation) {
$progress.attr({
value: animation.animationObject.currentStep / animation.animationObject.numSteps,
});
},
onComplete: function(animation) {
alert('onAnimationComplete')
}
}
},
borderColor: '#DA1A32',
fullWidth: true,
});
Source:stackexchange.com