Using htmltocanvas for my webpage but highcharts a

2019-08-23 06:30发布

I am trying to take an image of a part of my webpage, which occasionally would include highcharts. It works well except for some highcharts type.

As an example, this is my #PrintPanelScreen on webpage.

So partial charts are displaying, check the two links below, first image shows how it looks on webpage and second image shows how it looks when rendered. Notice colors are missing on the chart.

this.PrintPanel = function () {

html2canvas(document.querySelector("#PrintPanelScreen")).then(canvas =>    

 {     var img = canvas.toDataURL("image/png"); // image type is "image/png"
                  download(img, "modified.jpg", "image/jpeg");

    });
};

Image on webpage looks like this

Image after its rendered in canvas or after I open it in jpg looks like this, see colors missings

0条回答
登录 后发表回答