Export charts to PDF

I have built several charts with Plotly React. I would like to export all charts together in one PDF.

I am using the approach with html2canvas with jspdf.

However, in the resulted PDF, the gradient scale cannot be shown properly as it is a SVG element styled with CSS fill attribute.

How to solve this issue? What would be a better way to export the charts?


Have you came up with some idea? I encountered the same scenario.