One issue I'm facing is loading an image export of my chart after the animation finishes, using the onComplete callback. The problem arises when hovering over the diagram triggers the onComplete callback, significantly slowing down the page.
Below is my chart code:
this.chart = new Chart(this.$chart.getContext("2d"), {
type: 'doughnut',
data: data,
options: {
tooltips: {
enabled: false
},
animation: {
onComplete: (e) => {
console.log(e);
this.initExport();
}
}
}
});
I reviewed the Chart.js documentation but couldn't find a way to distinguish between the hover-animation and the "build"-animation of the chart. Does anyone have a solution for this challenge?