The current PDF implementation doesn't include the donut chart. This is not trivial, as PDFKit doesn't support SVG. It does have support for individual SVG paths. I made an initial attempt at redrawing the SVG in the document based on the paths, but especially the positioning gets tricky.
Given the time spent on the PDF already, I will mark this as an enhancement for a future phase.
Going forward, I can see two options:
turn the current chart into a canvas element. On PDF generation, it would be included with .toDataUrl; or
generate a base64 encoded png together with the SVG, and hide it somewhere on the page.
Reviving this issue as per latest request from the operations team. @EricSoroos is it possible to export the charts into the PDF report? @bpstewar for your reference.
The current PDF implementation doesn't include the donut chart. This is not trivial, as PDFKit doesn't support SVG. It does have support for individual SVG paths. I made an initial attempt at redrawing the SVG in the document based on the paths, but especially the positioning gets tricky.
Given the time spent on the PDF already, I will mark this as an enhancement for a future phase.
Going forward, I can see two options:
.toDataUrl
; or