Open YAGrand opened 6 years ago
Hi @YAGrand , this is a huge orgchart both in horizontal direction or vertical direction. Please try to export it to the png picture again.
Normal export occurs only if the main container position = initial
I solved the problem by adding directives to the css
#chart-container.canvasContainer{
position: initial;
}
New problem. How to make a picture sharper?
@YAGrand Try the PDF export. Still an embedded image, but works much better for me than PNG.
Edit: I also have custom html (see nodeTemplate) for the content. I think this is the main reason it looks better (sharper) for me. The default template is somehow blurry.
From the doc:
(3) Besides, if you wanna export a pdf format or your orgchart includes picture, you have to introduce jspdf and set "exportFileextension" option to "pdf".
Tried, but not exported to pdf. See gif: png export work:
You are right. Exporting is not soo nice. You may try another font, avoid rounded corners, box and text shadows... But I think it is not orgChart to blame. It is propably the browser and html2canvas... (btw. are you already using the latest 1.0.0-a9 of html2canvas?)
Another way, you maybe can try and report back: use an html2pdf or html2image converter at the backend. If you are using PHP, you may try this one: https://html2pdf.fr/en/home
Using html2canvas 0.5.0-beta3 Tried html2canvas 1.0.0-alpha.9, not woking pdf and png export.
Another way, you maybe can try and report back: use an html2pdf or html2image converter at the backend. If you are using PHP, you may try this one: https://html2pdf.fr/en/home
Does it support the transform property?
Strange, I'm using html2canvas 1.0.0 a9, with jspdf 1.3.5 and orgChart 2.0.15. (in Opera, Chrome, Firefox, Edge it is working for me)
Don't knwo if it is supporting transform, maybe just try ;)
@YAGrand maybe you should check the browser console. Are there any errors? Sometimes, when the image is too large, the browser may not be able to transform it to canvas. Check and see if there are any errors.
Hi, I try to export my chart to png, as a result I get cropped image.