@Api developer :
Below is jqyery code snipped it used to trigger an event when a key is
pressed (down).
$(document).keydown(function(e) {
//If escaped key is pressed.
if (e.keyCode == 27) {
//Some functions.
}
});
Dont't know exactly if the below code will work on not.
google.visualization.events.addListener(pie, 'keydown', function (e) {
alert(e.keyCode);
});
On Tue, Jul 31, 2012 at 8:42 PM, API Developer <[email protected]>wrote:
> Great! Do you know what I'd need to bind if I wanted to
> handle key-presses (like pressing down the CTRL button) no matter where
> they were clicked so I could differentiate some of my events. For example,
> I'd like to allow for multiple selections when the CTRL is held down, but
> when it is released, I'd like to manage those selections. Do you know of a
> way to do this?
>
>
> On Tuesday, July 31, 2012 10:48:37 AM UTC-4, asgallant wrote:
>>
>> I guess it depends on what you want the keyboard interaction to be. You
>> can bind keypresses using jQuery and then mess with the charts, but I don't
>> know what use binding keypresses to the SVG would be.
>>
>> On Tuesday, July 31, 2012 8:47:56 AM UTC-4, API Developer wrote:
>>>
>>> Hey asgallant,
>>>
>>> If I wanted to add keyboard functionality in the Google Chart API, would
>>> it be possible to use JQuery in a similar way to what's specified above?
>>> $('iframe').contents().find('**g')...
>>> I'd imagine I'd need to use browser-based if statements to make sure
>>> this works, but is it possible?
>>>
>>> On Monday, July 30, 2012 5:02:26 PM UTC-4, asgallant wrote:
>>>>
>>>> That should work in every browser except IE < 9, provided you have set
>>>> the forceIframe option to true. You need to have two separate code paths
>>>> to do this though, one for IE < 9 and one for everything else. IE < 9 uses
>>>> VML instead of SVG, so you have to figure out what the structure is for the
>>>> pie slices in VML and then write code to handle them (keep in mind that IE
>>>> < 9 always uses iframes, regardless of what you set the forceIframe option
>>>> to). If you didn't set the forceIframe option, the non-IE < 9 code-path
>>>> should not select based on $('iframe').contents().
>>>>
>>>> On Monday, July 30, 2012 3:44:37 AM UTC-4, Nikhil Agrawal wrote:
>>>>>
>>>>> HI All,
>>>>>
>>>>> I am working on pie chart. On clicking on each pie segment it gets
>>>>> redirected to some url. So i want that when mouse hovered it should show a
>>>>> hand cursor.
>>>>> I tried using jquery as follows inside an ready event listner.
>>>>>
>>>>> $('iframe').contents().find('**g').css( 'cursor', 'pointer' );
>>>>>
>>>>> It doesn't show a hand cursor in the* pie segment*. But instead in
>>>>> tooltip & legends of the pie chart.
>>>>> Can any one suggest me what should be done to show show the hand
>>>>> pointer inside each segments.
>>>>>
>>>>>
>>>>> Thanks in Advance ..:)
>>>>>
>>>>
>> On Tuesday, July 31, 2012 8:47:56 AM UTC-4, API Developer wrote:
>>>
>>> Hey asgallant,
>>>
>>> If I wanted to add keyboard functionality in the Google Chart API, would
>>> it be possible to use JQuery in a similar way to what's specified above?
>>> $('iframe').contents().find('**g')...
>>> I'd imagine I'd need to use browser-based if statements to make sure
>>> this works, but is it possible?
>>>
>>> On Monday, July 30, 2012 5:02:26 PM UTC-4, asgallant wrote:
>>>>
>>>> That should work in every browser except IE < 9, provided you have set
>>>> the forceIframe option to true. You need to have two separate code paths
>>>> to do this though, one for IE < 9 and one for everything else. IE < 9 uses
>>>> VML instead of SVG, so you have to figure out what the structure is for the
>>>> pie slices in VML and then write code to handle them (keep in mind that IE
>>>> < 9 always uses iframes, regardless of what you set the forceIframe option
>>>> to). If you didn't set the forceIframe option, the non-IE < 9 code-path
>>>> should not select based on $('iframe').contents().
>>>>
>>>> On Monday, July 30, 2012 3:44:37 AM UTC-4, Nikhil Agrawal wrote:
>>>>>
>>>>> HI All,
>>>>>
>>>>> I am working on pie chart. On clicking on each pie segment it gets
>>>>> redirected to some url. So i want that when mouse hovered it should show a
>>>>> hand cursor.
>>>>> I tried using jquery as follows inside an ready event listner.
>>>>>
>>>>> $('iframe').contents().find('**g').css( 'cursor', 'pointer' );
>>>>>
>>>>> It doesn't show a hand cursor in the* pie segment*. But instead in
>>>>> tooltip & legends of the pie chart.
>>>>> Can any one suggest me what should be done to show show the hand
>>>>> pointer inside each segments.
>>>>>
>>>>>
>>>>> Thanks 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/-/vXwhl_zWmkwJ.
>
> 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.
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
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.