1๐
I know that itโs been awhile since you have asked the question, but in the Chart.js v2 you have to use onComplete
method within the animation option.
animation: {
duration: 1500,
onComplete: function (animation) {
this.toBase64Image();
}
- [Chartjs]-Chart.js bar chart: show tooltip on label hover
- [Chartjs]-How to use PrimeNg Chart of Width and Height?
-1๐
you have to call save64Img(myChart.toBase64Image())
over an additional callback.
You can add this callback to the options
lineOptions = {
onAnimationComplete: function () {
save64Img(myChart.toBase64Image());
}
}
Source:stackexchange.com