Home › forums › Using CanvasJS › Export Multiple chart in one pdf
This topic contains 3 replies, has 3 voices, and was last updated by Vishwas R 2 weeks, 6 days ago.
Its working fine when 3 charts . its exports correctly.
but if more than 5 charts pdf size will change but chart not show in pdf.
We don’t have exporting chart as pdf, as of now. But with couple of lines of code you can export to pdf using jsPDF as shown in this jsfiddle.
Using html2canvas along with jspdf, you can achieve exporting multiple charts. Refer this jsfiddle for the same.
Exporting more than 5 charts also seems to be working fine, when you configure html2canvas options accordingly. Please take a look at this updated jsfiddle. Please refer html2canvas documentation for more configuration options available and configure it in your webpage / app accordingly.
I need to export multiple charts from a single page. Exporting first chart is ok but when I try to export 2nd chart, the chart exports successfully but the chart rendered in PDF from the x-coordinate(say 400px of the window) where the width of first chart was ended because of which half of the second chart is hidden. Could you please suggest me to solve this issue. Might be we need to refresh html2canvas?
Exporting multiple charts (morethan 5) also seems to be working fine – charts are positioned vertically and not one next to other. Can you kindly share JSFiddle reproducing the issue you are facing so that we can look into your code, understand it better and help you out?
Also refer documentation of jsPDF and html2canvas for more available options like offsets / position of an element while exporting DOM as PDF.
You must be logged in to reply to this topic.