Table visualizations are just HTML tables, so if you set the 'allowHtml'
option to true, it should work if your img tags are formatted properly.
The query won't return the images themselves if you place them in the
spreadsheet, the best way to handle it is to either:
a) include image tags in a column of the spreadsheet as strings ('<img
src="http://path/to/img.jpg" />') or
b) include urls to the images in a column of the spreadsheet and use a
PatternFormatter<https://developers.google.com/chart/interactive/docs/reference#patternformatter>to
create the image tags
On Thursday, May 17, 2012 2:04:04 PM UTC-4, Frans wrote:
>
> Hi,
> I'm trying to insert a Google Spreadsheet in an html document and show it
> as a table.
> So, my source is a Google Docs document and I call it with a query (var
> query = new google.visualization.Query).
>
> My table is a list of countries with some data about them. Html
> visualization until this point is OK.
>
> But I want to add a column with an image (a flag). I don't know if it's
> possible to do this and, if possible, how to do it.
>
> I've tried to put the link in the cell of the Google Spreadsheet,
> copy-paste an image, and an img src="...", but no luck. The only thing I
> have is the code written inside the cell both in the GDocs and the html
> visualization.
>
> I've defined as an option(var options = {allowHtml: true};
>
> Any suggestion?
>
> Thank you in advance!
>
--
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/-/wJCZ6Yciv8cJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.