How to export Charts to PDF with jsPDF in Chart JS

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ต.ค. 2024

ความคิดเห็น • 28

  • @rnzsilvam
    @rnzsilvam 2 ปีที่แล้ว +1

    Thanks a lot!!! greetings from Peru!

  • @dalf22
    @dalf22 2 ปีที่แล้ว +1

    B-E-A-U-T-I-F-U-L !! Thanks ! Looking forward for the jsPDF seriees, but this is something I did not know I need it.

  • @randallparman5862
    @randallparman5862 8 หลายเดือนก่อน

    I am trying to add datalabels to a chart that uses jsPDF and ChartDataLabels. Whenever I add the plugins: [ChartDataLabels] the chart background is black. I have the bgColor plugin that you show in this video. Are we not able to add labels to the PDF output? Thank you. All your videos have been helpful.

  • @rizwankamleen1691
    @rizwankamleen1691 ปีที่แล้ว +1

    Thanks for the video, it helps me a lot. Just an induction (correct me if needed) that instead of using jpeg if png is used, the downloaded graph is white in the background by default. The downloaded chart is somehow blurry so if you can guide for that too, will be a blessing. 🙂

  • @danialsheikh7010
    @danialsheikh7010 9 หลายเดือนก่อน

    Hi there, My chart is way too big to fit on the pdf document and keeps cutting on the page is there anyway to ensure it fits each time?

  • @anggagemilang7956
    @anggagemilang7956 ปีที่แล้ว

    i have case that line chart too long so it need to scroll, is it possible if I export little by little range of data to a multiple page in pdf? thanks

  • @hermanheunis9354
    @hermanheunis9354 ปีที่แล้ว

    Good video. Very importrant is the jspdf.debug.js lib, sincs the PDFJS object will not be found without it.

  • @RicardoChiavelli
    @RicardoChiavelli 2 ปีที่แล้ว

    Great tutoria! I have many charts on a page (multiple canvas). How can I save all as a PDF file?

  • @edgarsantiago3688
    @edgarsantiago3688 ปีที่แล้ว

    I have a problem and it is that how the graph adapts to the device is how it will be seen in the pdf, that is, it is not a fixed view, I would like it to be a PC-only view for the PDF.

  • @mavbcn1790
    @mavbcn1790 ปีที่แล้ว

    How could I export some chars and some text to get a full report in pdf?
    thanks!

  • @suniliihglobal
    @suniliihglobal ปีที่แล้ว

    I have already used same but PDF generated blury even quality set (1.0) please here for that
    thank in advance.

  • @balajiprabhaharan4032
    @balajiprabhaharan4032 2 ปีที่แล้ว

    is it possible to export the charts in excel format with filters?

  • @loupsalome8874
    @loupsalome8874 2 ปีที่แล้ว

    Hello , i tried this tutorial , but when i call the addImage function , and then i save to pdf. It give me a black square , how can i fix it ?

  • @anilkrishnadesu3243
    @anilkrishnadesu3243 8 หลายเดือนก่อน

    i want render a pie chart in my pdf, i not rendering this my chart on my jsx, i am using react js, and using this chart js versions `` "chart.js": "^4.4.1",`` and ``` "react-chartjs-2": "^5.2.0",```, please respond to my comment. i am not rendering the chart in jsx.

  • @acydburn01
    @acydburn01 2 ปีที่แล้ว

    this is great. also would like to know how to put the data on the bars of the barchart when exported to pdf. you know when you hover on the chart and it shows the value as a tooltip. how do we add that when we export to pdf? thanks

    • @ChartJS-tutorials
      @ChartJS-tutorials  2 ปีที่แล้ว

      Hi Acydburn01, thank you for your question. While having tooltips shown all the time is not possible but there is an alternative. You can use the Chart.js Datalabels Plugin also known as [chartjs-plugin-datalabels] to show the labels fixed on top of the bar. I have an entire series here: th-cam.com/play/PLc1g3vwxhg1W4bPr3UrM_7xfzJr1O08cZ.html
      It will show you all the features and options that the datalabels plugin has.

  • @parimal20
    @parimal20 2 ปีที่แล้ว +2

    i have multiple charts in one page so how to export all graph in one pdf?

    • @santiagospizzirri
      @santiagospizzirri 2 ปีที่แล้ว

      I have the same issue, multiple charts in one page. Let's hope he sees this. :)

    • @ChartJS-tutorials
      @ChartJS-tutorials  2 ปีที่แล้ว +1

      Hi Santiago and Parimal. I have already made a note on this topic. Currently improving my jsPDF knowledge. I hope to have soon an answer.

    • @parimal20
      @parimal20 2 ปีที่แล้ว

      @@ChartJS-tutorials I tried to use loop on html2canvas().then(function(){canvas.toDataURL()}) but html2canvas using promise so it doesnt support synchronous and when i generate pdf, it downloads blank. so if anyone have idea to make synchronous please guide.

    • @parimal20
      @parimal20 2 ปีที่แล้ว

      @khodor osmane Yes. I got solution. I used for loop and inside it i used await html2canvas.

    • @sanjeer6202
      @sanjeer6202 2 ปีที่แล้ว

      @@parimal20 can you please share the code link ?? Please??

  • @fihfgpwoejf8611
    @fihfgpwoejf8611 2 ปีที่แล้ว

    Hi i get an error that says tahat jsPDF is not a constructor

  • @affifahnasrillah8303
    @affifahnasrillah8303 2 ปีที่แล้ว

    in advance, I thank you because this video is very helpful. but allow me to ask, how to insert a logo on the page containing the chart? thanks before..

    • @ChartJS-tutorials
      @ChartJS-tutorials  2 ปีที่แล้ว

      Hi Affifah, thank you for your question. I haven`t tested this but I suspect this should work. Add image first in the canvas like this: th-cam.com/video/LqVvxRy4ufo/w-d-xo.html

  • @ekadalaspangestu8429
    @ekadalaspangestu8429 2 ปีที่แล้ว

    How can I export my chartjs to excel

  • @pablomoragacontrera4311
    @pablomoragacontrera4311 2 ปีที่แล้ว

    I can do on typescript? react

  • @ivanjosuecarrillosolis7417
    @ivanjosuecarrillosolis7417 2 ปีที่แล้ว

    thanks