0
votes

I'm using Google Apps script to build a Google Doc from data I have in a Google sheet. I'd like to use Google apps script to build a bar chart from some of the data in the spreadsheet. I've figured out how to generate the chart, but I don't see how to insert the chart into the actual document.

1

1 Answers

0
votes

If you've built the chart using apps script; Charts service then you can insert it as an image. There might be a better way of doing though.

  var myChartBlob = myChart.getAs('image/png').copyBlob();
  var myChartImage = docBody.appendImage(myChartBlob);