使用htmltocanvas作为我的网页,但是highcharts正在变得局部

时间:2018-05-07 19:35:55

标签: highcharts html2canvas

我正在尝试拍摄我网页的一部分图片,偶尔会包含高图。它除了一些highcharts类型外,效果很好。

例如,这是我在网页上的#PrintPanelScreen。

因此显示部分图表,请检查下面的两个链接,第一张图片显示它在网页上的显示效果,第二张图片显示呈现时的外观。图表上缺少注意颜色。

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 个答案:

没有答案