To answer my own question, I have figured out the following.
This is based on Nagios XI 5.6.8 with NagVis 1.9.8
In the template HTML, I added the following table row at the end of the table
<tr><td class="label">PNP Graph</td><td><img src='https://#NAGIOS-HOST#/nagiosxi/includes/components/perfdata/graphApi.php?host=[obj_name]&service=[service_description]&view=1&username=#Username#&ticket=#TOKEN#'></td></tr>
Where #NAGIOS-HOST#, #Username# and #TOKEN# are replaced accordingly.
For the gadget object in NagVis I set ‘hover_template’ to ‘default-pnp’.
This seems to work nicely! The graphs are not the ones shown in the rest of Nagios XI, but it’ll do for now.
Thank you to @pamuro01 for the hint!