[Chartjs]-How to export a chart in Excel and PDF format using Chart.js

0👍

Chart.js doesnt support conversion to pdf but you can convert it to image by using following code

function done() {
    console.log('done');
    var url=document.getElementById("page").toDataURL();
    document.getElementById("url").src=url;
}

In options you have to set the following :

onAnimationComplete: done

Leave a comment