Here's a rough function that will do this:

function printDiv (container) {
    var w = window.open();
    w.document.write(container.innerHTML);
    w.print();
    w.close();
}

Call it like this:

printDiv(document.getElementById('chart_div'));

Note that you will lose any CSS styling in the process, but this doesn't 
usually matter for the charts.

On Friday, December 14, 2012 8:11:11 PM UTC-5, Chrystopher Medina wrote:
>
>
>
> hi my friend do u have any idea how i can print what i have in a <div>  u 
> know i want a button in order to print my pie charts  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/of8WXChDmkoJ.
To post to this group, send email to google-visualization-api@googlegroups.com.
To unsubscribe from this group, send email to 
google-visualization-api+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to