Hi,

Firstly, the chart is already being drawn by the dashboard, so you do not
need to draw it again. Secondly, you should listen for the ready event
before getting the image from the chart. You can listen to the ready event
right on the ChartWrapper. Here's an example: https://jsfiddle.net/LLd51j7o/

On Sat, May 2, 2015 at 5:22 PM da <[email protected]> wrote:

> This does not work.
>
> .....
> dashboard.draw(data); // works up to here
>
> //but when I try to get the PNG, Nothing happens. Is the code below
> correct?
>
>         var chart2 = chartwrapper.getChart();
>         chart2.setContainerId(document.getElementById('chart2'));
>         chart2(draw,xoption);
>         document.getElementById('png').outerHTML = '<a href=\"' +
> chart2.getImageURI() + '\">Printable version</a>';
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to
> [email protected].
> Visit this group at
> http://groups.google.com/group/google-visualization-api.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to