Using htmltocanvas for my webpage but highcharts are coming partial

我是研究僧i 提交于 2019-12-11 14:19:12

问题


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

来源:https://stackoverflow.com/questions/50221267/using-htmltocanvas-for-my-webpage-but-highcharts-are-coming-partial

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!