Blank PNG image is shown with toBase64Image() function


If a blank image is shown with the toBase64Image() function, you need to use the following to work on it correctly:

animation: {
   duration: 2000,
   onComplete: function (animation) {
      this.toBase64Image();
   }
}

With that, you can also use another fix. Call save64Img(myChart.toBase64Image()) over an additional callback and set it like this:

myLine = {
   onAnimationComplete: function () {
      save64Img(myChart.toBase64Image());
   }
}

Samual Sam
Samual Sam

Learning faster. Every day.

Updated on: 29-Jan-2020

129 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements