View Only

 Error in CDE Dashboard to save chart as image

Jason Serrano's profile image
Jason Serrano posted 02-10-2023 17:17



I have an error with a CDE Dashboard. I’m creating a dashboard with options to download data and download the charts as image. For download data, I’m using the Export Button Component and to download the chart as image, I’m using html2canvas with a HTML Button. I chose html2canvas because the option available in Pentaho named as “Export Popup Component” export the chart without the settings displayed in the dashboard.


The function html2canvas works fine to export the charts, but if I use the function to export data (Export Button Component) before, and then I export a chart as image (html2canvas function), the system displays an error. However, the chart is saved correctly as an image. If I only use the option to download the chart as image with different charts the function works without errors. But if I use the function to export data, the system shows the error.

Thanks in advance.


Additional information related to the issue:

Function html2canvas:


function downloadimage(chartDiv) {


            var container = document.getElementById(chartDiv);/*specific element on page*/

            html2canvas(container, { allowTaint: true }).then(function (canvas) {


            var link = document.createElement("a");


   = "grafico.png";

            link.href = canvas.toDataURL();

   = '_blank';





            return true;



Error displayed in console:


document-cloner.ts:136          GET /pentaho/plugin/cda/api/unwrapQuery?path=%2Fhome%2Fjaserrano%2FPlantilla+2023.cda&uuid=396b75ba-acfb-47cf-aa3c-4c6ebf7ebb07 500 (Internal Server Error)


Error displayed in Catalina.out: 

In the file attached.

Attachment  View in library