Creating print formats for graphs.

How can I create print formats graphs in jinja templates, am unable to display the graph using the script, but I can fetch data from the DOCTYPE
.