You need to access mouse.x and mouse.y, not mouse.X or mouse.Y. See an
example here: http://jsfiddle.net/asgallant/W7RVP/
On Tuesday, March 19, 2013 8:44:04 PM UTC-4, Praveenkumar Gola wrote:
>
> Thanks for replying soon.
> the below is my scenario i trigger this event when mouseover a column in
> column chart
> div in my element to show when mouseover and below is mycode and its not
> working
>
>
> *var mouse = {x: null, y: null};*
> *document.onmousemove = function (e) {*
> * mouse.x = e.pageX;*
> * mouse.y = e.pageY;*
> *}*
> *google.visualization.events.addListener(chart, 'onmouseover', mouseover);
>
> function mouseover(e)
> {
>
> $('#div').show(1000);
> $('#div').offset({left:mouse.Y,top:mouse.Y});
>
> }*
>
> On Tuesday, March 19, 2013 11:49:36 PM UTC, asgallant wrote:
>>
>> The mouseover events in the API don't work the same as HTML mouseover
>> events. To get the location of the mouse pointer, you will need to keep
>> track of it some other way. Here's one way:
>>
>> var mouse = {x: null, y: null};
>> document.onmousemove = function (e) {
>> mouse.x = e.pageX;
>> mouse.y = e.pageY;
>> }
>>
>> Check the values in "mouse" when you need them.
>>
>> On Tuesday, March 19, 2013 7:23:55 PM UTC-4, Praveenkumar Gola wrote:
>>>
>>> Hi,
>>> I drawn a Column Chart and i want to display a div when mouseover a
>>> column, for this i needed a X and Y coordinates.
>>> i know i can trigger mouseover event for columnchart which i did but i
>>> cannot get the e.pageX and e.pageY values with this event, is there way to
>>> get mouse co ordinates.
>>>
>>> Thanking in advance.
>>>
>>>
>>>
--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.