Actually, there is a way, but it is not part of the API, and it is a bit
tricky and unreliable.  First, you have to wait for the chart to be ready
before calling getImageURI().  But to capture the tooltip, then you have to
wait until the user has hovered over the region in question and the tooltip
is drawn.  There is no event to signal that the tooltip is drawn, however,
so you can't depend on it being displayed.  The best you can do is do the
getImageURI() call in a timeout, or perhaps set up a keyboard event handler
and ask the user to hit the key.

By the way, if the setSelection() feature was supported for the GeoChart,
you could at least programmatically show the tooltip.  But you would still
have to wait some time before calling getImageURI().


On Wed, Feb 26, 2014 at 1:21 PM, asgallant <[email protected]>wrote:

> There is no way to add the tooltips to the image at this time, sorry.
>
>
> On Wednesday, February 26, 2014 1:01:25 PM UTC-5, mani vannan wrote:
>>
>> Hi ,
>>
>> My project needs geochart to be converted to image , I achieved
>> converting to image with the group's help.
>>
>> Now, i need image with the tooltip visible , i tried many ways but i cant
>> get through,
>>
>> Please anyone help me to achieve the task,
>>
>> *Sample image:*
>>
>>
>> <https://lh6.googleusercontent.com/-fBOA2BQy5KM/Uw4q3TZOlcI/AAAAAAAAAfQ/xFAVb5TuiL0/s1600/Picture2.png>
>>
>>
>> *Sample Code:*
>>
>> <html>
>> <head>
>> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
>> <title>Insert title here</title>
>> <script type="text/javascript" src="https://www.google.com/jsapi";></script>
>>
>>   <script type="text/javascript">
>>   google.load('visualization', '1', {'packages': ['geochart']});
>>   google.setOnLoadCallback(drawMarkersMap);
>>
>>    function drawMarkersMap() {
>>    var data = google.visualization.arrayToDataTable([
>>      ['City',   'Population', 'Area'],
>>      ['Rome',      2761477,    1285.31],
>>      ['Milan',     1324110,    181.76],
>>      ['Naples',    959574,     117.27],
>>      ['Turin',     907563,     130.17],
>>      ['Palermo',   655875,     158.9],
>>      ['Genoa',     607906,     243.60],
>>      ['Bologna',   380181,     140.7],
>>      ['Florence',  371282,     102.41],
>>      ['Fiumicino', 67370,      213.44],
>>      ['Anzio',     52192,      43.43],
>>      ['Ciampino',  38262,      11]
>>    ]);
>>
>>    var options = {
>>      region: 'IT',
>>      displayMode: 'markers',
>>      colorAxis: {colors: ['green', 'blue']}
>>    };
>>
>>    var chart = new 
>> google.visualization.GeoChart(document.getElementById('chart_div'));
>>    chart.draw(data, options);
>>
>>   chart_div.innerHTML = '<img src="' + chart.getImageURI() + '">';
>>
>> };
>>
>>       </script>
>> </head>
>> <body>
>> <div id="chart_div" style="width: 900px; height: 500px;"></div>
>>
>>
>> </form>
>> </body>
>> </html>
>>
>>
>> *Thanks,*
>>
>> *Mani*
>>
>>
>>
>>
>>  --
> 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/groups/opt_out.
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>  -
978-394-1058
[email protected] <[email protected]>   5CC, Cambridge MA
[email protected] <[email protected]> 9 Juniper Ridge
Road, Acton 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 http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to