I don't think charts are supported in Document Templates, you could generate an Image of the chart using the Plotly API, and somehow get that into the Document Template but I think that would be quite tricky.
In my opinion it would be best to move away from the Document Templates module and upgrade to the PDF Document module
Thought this may seem like a big undertaking, I feel it will serve you better and save time in the long term.
I agree with Matthew. If for some reason, for instance you are running on premise, and can’t use the PDF Document Generation module from Mendix, another option is the JFreeCharts module. I have used it to generate charts in the background (no need to show on a page) and then append them to a document template as a picture. I have customized the module a bit so it can also handle 2 chart types (bar + line) in one picture.