Save the render diagram in a JS variable. Ajax is for phpmailer and send it by email.
Works in gmail safari but not in chrome / mozilla. Also works when opening a workspace in an email.

$(document).on("trigger", function() { var chart = $('#print').html(); var email = $('#email').val(); $.post("../client/makereport.php", {print: chart, email: email}); })
source share