https://developers.google.com/chart/interactive/docs/customizing_tooltip_content#custom_html_content
shows you how to do this. The example even uses flags, just like you
ordered!

Jon


On Mon, Aug 4, 2014 at 7:19 AM, Inte snäll <nije...@gmail.com> wrote:

> As it is now I have text as toolTip hint under the graph nodes, but my
> question is, is it possible to have icons instead?
>
> Like flotr2 have.
>
> http://www.humblesoftware.com/flotr2/index#!advanced-markers
>
> var dt = new google.visualization.DataTable();
>                     dt.addColumn('date', 'Entered date');
>                     dt.addColumn('number', resultKey);
>                     dt.addColumn({type: 'string', role: 'tooltip', 'p':
> {'html': true}});
>                     dt.addColumn({type: 'string', role: 'annotation', 'p':
> {'html': true}});//This should recognize html but it doesn't, for example 
> *'<img
> width=100px
> src="http://upload.wikimedia.org/wikipedia/commons/2/28/Flag_of_the_USA.svg
> <http://upload.wikimedia.org/wikipedia/commons/2/28/Flag_of_the_USA.svg>">'
> is printed out as a string.*
>                     dt.addColumn({type: 'string', role: 'annotationText',
> 'p': {'html': true}});
>
>
>
> I would like to have something like instead of having the text "All time
> high" in the bellow link, I would like the american flag in that example.
> So instead of a ('C') bellow I would like an image instead.
>
>
> https://developers.google.com/chart/interactive/docs/customizing_tooltip_content?hl=sv#tooltips_for_annotations
>
>                                 new Date(data.StopTime),
>                                 parseInt(result),
>                                 this.getTooltip(data, result,
> testResultComment),
>
> tooltipHint,//(data.TestResultComments[resultKey] != null) ? 'C' :
> null,//Instead of 'C' I would like an image.
>                                 'test'
>                             ]
>                             ));
>
> Instead of 'C'  I would like to use *'<img width=100px
> src="http://upload.wikimedia.org/wikipedia/commons/2/28/Flag_of_the_USA.svg
> <http://upload.wikimedia.org/wikipedia/commons/2/28/Flag_of_the_USA.svg>">'*
>
> --
> 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 google-visualization-api+unsubscr...@googlegroups.com.
> To post to this group, send email to
> google-visualization-api@googlegroups.com.
> 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 google-visualization-api+unsubscr...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
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