Is it possible to export graphs in 1 pdf?
Hello,
You can export charts to the PDF format, but it will be shown as a datatable. toPDF works with data components.
As a workaround: Code Snippet
Thx, it is exactly what is needed, but can I export a few charts in one PDF?
In future versions we will add API to export charts as images, as well as several widgets, so the above functionality will work out of box.
Thanks, it helped a lot) But I have a new problem, not all charts are shown in PDF, Screenshot by Lightshot How I can fix this problem?
There may be a problem with the spacer
So try to add background:"#fff",
to the html2canvas library as
html2canvas($$(id).$view, {
background:"#fff",
...
Please check the sample: https://snippet.webix.com/pq6u3ti0
Unfortunately, the problem doesn’t relate to Webix
With PDF export Webix relies on thirdparty libraries, so we are limited by their possibilities.
You can try to add
$$('sc').$view.style.overflow = "visible";
webix.toPNG($$('referals-chart-layout')).then(function(){
$$('sc').$view.style.overflow = "scroll";
});
Quick sample: https://snippet.webix.com/gxj56fcp
As a workaround
You can set a fixed size via CSS
.html2canvas-container {
width: 3000px !important;
height: 3000px !important;
}
Thx for help)