I take a tutorial to print Google Charts from this document. Google Charts Documentary But I have some problems that I want to ask, maybe anyone can help me?
- How to save chart as image directly when i click link button?
- How to directly open the image to new tab when i click "print" button? I tried adding "target = blank" but it didn't work.
the real code
document.getElementById('png').outerHTML = '<a href="' + chart.getImageURI() + '">Printable version</a>';
and im trying to add target='_blank' here
document.getElementById('png').outerHTML = '<a href="' + chart.getImageURI() + '" target="blank">Printable version</a>';
this my fiddle for testing the code