I use chart.getBlob() to retrieve the chart data from Google sheet, and then insert it as an inline image to the email. The chart in Google sheet has two vertical axises, but it only shows one vertical axis in the email.
Code:
function sendNotificationManually(){
var sheets = SpreadsheetApp.getActive().getSheets();
for(i in sheets){
if(sheets[i].getName().toUpperCase().indexOf(HISTORY) >=0){
var sheet = sheets[i];
break;
}
}
var chart = sheet.getCharts()[0];
var template = HtmlService.createTemplateFromFile("template");
template.url = SpreadsheetApp.getActiveSpreadsheet().getUrl();
var recipient = Session.getActiveUser().getEmail();
var subject = SpreadsheetApp.getActive().getName();
var body = "";
var options = {
noReply:true,
htmlBody:template.evaluate().getContent(),
inlineImages:{
chart:chart.getBlob()
}
};
MailApp.sendEmail(recipient, subject, body, options);
}