Home Forums Feature Requests & Feedback Canvas Charts Export to Excel and PDF

Canvas Charts Export to Excel and PDF

Viewing 2 posts - 1 through 2 (of 2 total)
  • #10169

    Hi,

    Please let me know whether Canvas Charts has feature to Export Chart to PDF and Export Chart to Excel

    Thanks,
    Prasanna

    #10173

    Prasanna,

    Exporting Chart data to excel or pdf is not available as an inbuilt feature as of now. However, you can can export chart to pdf using jsPDF as shown in the below code snippet.

    $("#exportButton").click(function(){
        var pdf = new jsPDF();
        pdf.addImage(dataURL, 'JPEG', 0, 0);
        pdf.save("download.pdf");
    });

    Please take a look at this JSFiddle for an example on exporting chart to pdf using jsPDF.

    Export chart to PDF using jsPDF

    For exporting into Excel you can use libraries like excelbuilder or SheetJS. Please take a look at this JSFiddle for exporting chart data to excel using SheetJS.

    Export chart data in excel using SheetJS

    —-
    Sanjoy Debnath
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.