Blank PNG image is shown with toBase64Image() function

JavascriptWeb DevelopmentFront End Scripts

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());
   }
}
raja
Published on 10-Apr-2018 11:33:21
Advertisements