The getImageURI() method is not supported for the Table chart, but it is
all HTML anyway, so you should just be able to print it, if printing is
your goal rather than getting an image.

On Fri, Apr 29, 2016 at 6:01 AM, Lucie W <[email protected]> wrote:

> Hello everybody,
>
> I would like to print a Table chart in png.
>
> This is my code.
>
> function drawTable() {
>         var data = new google.visualization.DataTable();
>         data.addColumn('string', 'Semaines');
>         data.addColumn('number', 'Projets');
>         data.addColumn('number', 'Demandes');
>         data.addColumn('number', 'Tickets');
>         data.addRows([
>           ['Mars S11', {v: 0, f: '0h'}, {v: 0, f: '0h'}, {v: 18.5, f:
> '18h30'}],
>           ['Mars S12', {v: 12, f: '12h'}, {v: 0, f: '0h'}, {v: 15, f:
> '15h'}],
>           ['Mars-Avril S13', {v: 4, f: '4h'}, {v: 2, f: '2h'}, {v: 19, f:
> '19h'}],
>           ['Avril S14', {v: 6, f: '6h'}, {v: 3, f: '3h'}, {v: 10, f: '10h'
> }]
>         ]);
>
>         var table_div = document.getElementById('table_div');
>         var table = new google.visualization.Table(table_div);
>
>         google.visualization.events.addListener(table, 'ready', function
> () {
>             table_div.innerHTML = '<img src="' + table.getImageURI() +
> '">';
>             console.log(table_div.innerHTML);
>         });
>
>         table.draw(data, {showRowNumber: true, width: '100%', height:
> '100%'});
>       }
>
> When I open it, this error appear : "table.getImageURI is not a function".
>
> So my question is: is it possible to print a Table chart in png ?
>
> Thank you.
>
> --
> 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
> https://groups.google.com/group/google-visualization-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/cc0ca671-e779-4cf2-a8be-4647cfad83fd%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/cc0ca671-e779-4cf2-a8be-4647cfad83fd%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
[email protected] <[email protected]>   5CC, Cambridge MA

-- 
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJOmvV8xN8KWdRpQm%2BnEvpssWKdW2%3DHQZbtW%2BWB4w6jLDQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to