Chartjs-Chart.js – get base 64 encoded string as variable

0👍

Managed to work this out as follows:

onAnimationComplete: function() {
    document.getElementById("canvas").innerHTML = myRadar.toBase64Image();
    var x = document.getElementById("canvas").innerHTML = myRadar.toBase64Image();
    theParam = encodeURIComponent(x);
    theURL = "fmp://$/chartingFile?script=getChartToContainer&param=" + theParam;
    window.location = theURL;

Not sure if it’s optimal etc but it’s working well so far.

Leave a comment