0

referring to Google Charts documentation I can get the chart Image URI using chart obj function getImageURI . works well for one chart.

I have multiple charts in one page and I would like to export them in one png image. Is that doable?

code: jsFiddle

docs link: Printing PNG Charts

sisimh
  • 1,287
  • 3
  • 20
  • 37
  • See [How can i create Canvas Image from image sources in an array?](http://stackoverflow.com/questions/32292364/how-can-i-create-canvas-image-from-image-sources-in-an-array) [Can't download canvas content](http://stackoverflow.com/questions/36880509/cant-download-canvas-content/) – guest271314 Jan 02 '17 at 16:59
  • @guest271314 thanks, I'm following the approach in that answer but maybe I'm missing something, so now the images array looks like this: ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABEAAAAFFCAYA.......", "data:image/png;base64,iVBORw0KGgoAAAANSUhE.....", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABEAAAA....."] .. is this to work in the same approach? – sisimh Jan 02 '17 at 17:25
  • Yes. `data URI` set as `.src` of `` element should return same result? – guest271314 Jan 02 '17 at 17:28
  • @guest271314 would you take a look at this fiddle I created ? http://jsfiddle.net/uhjyuhvh/ would appreciate the guidance – sisimh Jan 02 '17 at 18:28
  • `pngDataArr.forEach` should probably be outside of `chartObj.forEach()` call, `img.src = src;` should be outside of `img.onload`. Does `.draw()` have a callback? – guest271314 Jan 02 '17 at 18:43

0 Answers0