You could also try the JFree charts module. The typical usage scenario says "Create a .png image of a chart and use it in a pdf export."
You could try this app: https://appstore.home.mendix.com/link/app/27069/Mendix/Print-Screen-to-PDF
There are some drawbacks but it might solve your problem.
One more option to generate chart images is to use a service like ChartURL: https://charturl.com/