4

Is there anyway to have an export function to export the Google Visualization organizational chart as an image? I want this as a feature of my website, so people can click a button or a link and have it save as an image or a pdf file

leora
  • 188,729
  • 360
  • 878
  • 1,366

4 Answers4

3

Make a screen-shot of the browser. There are multiples tools out there to do this. We used this: http://code.google.com/p/speak-lib/source/browse/#svn/trunk/WebShot%3Fstate%3Dclosed

It works fine. We generate previews of design changes that way.

Robert
  • 1,466
  • 10
  • 25
  • 1
    i need this to be something that can be done by any user as a feature of the site . . – leora Jan 23 '10 at 17:40
  • 1
    Show the chart with an export button to the user, if the user clicks on the "export" button, you make the screen-shot of another browser instance (its just an library call) - and you are done. It does not scale great, but it works. – Robert Jan 23 '10 at 17:50
  • here's a link to the actual code that makes the screenshot: http://code.google.com/p/speak-lib/source/browse/trunk/SpeakLib.Utilities/Service/Imaging/WebScreenshotGenerator.cs – Stefan Paul Noack Feb 28 '12 at 12:28
  • http://code.google.com/p/speak-lib/source/browse/#svn/trunk/WebShot%3Fstate%3Dclosed not found – Marin Jul 28 '16 at 10:06
  • Hi @NunoMarinho, the sources relocated to https://github.com/teamaton/speak-lib/tree/master/WebShot. – Robert Jul 29 '16 at 19:53
1

Try http://phantomjs.org/ you can write script to cut your web page into PNG images of some fixed size and then assemble them into PDF.

Taryn
  • 242,637
  • 56
  • 362
  • 405
0

You can export the SVG code and send it to a server to convert it to an image. This is a scalable and easy solution. Answer details here: Convert Google Geochart to image (JPEG, PNG, etc.) or PDF in the browser

Community
  • 1
  • 1
Jeroen
  • 452
  • 5
  • 12
0

Use chart.getImageURI() it gives the image location