Hi Asgallant,
right now for my geochart I also face the same request of when mouseover
then change to the hand cursor. I tried the solution you suggested ,
however, the it only change for short time(one second maybe) when the mouse
moved from dataless area to the dataarea and if the option 'forcelFrame' is
not set to false, this will not working at all. I paste the code in the
following, could you help me to find out maybe there are some bugs i made
there? Thanks in advance!
Xia
google.load('visualization', '1', {packages: ['geochart']});
function drawVisualization() {
var data = google.visualization.arrayToDataTable([
['Country', 'Popularity'],
['Germany', 200],
['United States', 300],
['Brazil', 400],
['Canada', 500],
['France', 600],
['RU', 700]
]);
var geochart = new google.visualization.GeoChart(
document.getElementById('visualization'));
google.visualization.events.addListener(geochart, 'ready', function ()
{
$('#visualization').find('path[fill!="#f5f5f5"]').css('cursor',
'pointer');
});
geochart.draw(data, {width: 556, height: 347,forceIFrame:false});
}
google.setOnLoadCallback(drawVisualization);
On Thursday, May 24, 2012 7:52:05 PM UTC+2, asgallant wrote:
>
> jQuery can help you here. I haven't tested it, but in theory this should
> work:
>
> Set the 'forceIFrame' option to false (best for future compatibility - it
> can be done without this step, however). Use a ready event handler for
> your chart, and run this:
>
> google.visualization.events.addListener(geochart, 'ready', function () {
> $('#visualization').find('path[fill!="#f5f5f5"]').css('cursor',
> 'pointer');
> });
>
> If you use a color other than the default for dataless regions, you will
> need to change the '#f5f5f5' to the correct color string. If you want a
> hand cursor to appear for dataless regions too, then you can omit the '
> [fill!="#f5f5f5"]'.
>
> On Thursday, May 24, 2012 1:07:35 PM UTC-4, Sachin wrote:
>>
>> Hi,
>>
>> I am using Google Visualization Geochart API for one of the applications.
>> My query is that in any case can change the mouse cursor to a hand cursor
>> or any other type on mousehover on any regions or markers?
>>
>> please let me know if there is any way.
>>
>> Thanks and Regards,
>> Sachin
>>
>
--
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/-/IsrA9bEAXeQJ.
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.