We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Xamarin form | Wrapping chart with GestureRecognizer

Thread ID:

Created:

Updated:

Platform:

Replies:

120825 Oct 20,2015 06:08 AM Oct 21,2015 03:10 AM Xamarin.Forms 1
loading
Tags: SfChart
Eric Chong
Asked On October 20, 2015 06:08 AM

Hi SF team , 

May I know how to wrap Sfchart with GestureRecognizers ? Currently I have Chart wrapped in Stacklayout , and the Stacklayout adds a tap event like this 

tapgesture.Tapped += (sender, e) => {
//do stuff
};

mystack.GestureRecognizers.Add (tapgesture); 

But when the Chart inside the Stacklayout is clicked , it doesn't fire the event . Any options ? Thanks . 

Magesh Kumar Krishnan [Syncfusion]
Replied On October 21, 2015 03:10 AM

Hi Eric,

Thanks for using Syncfusion products.

The Chart handled the touch action when clicked on the Chart. We request you to add a TapGestureRecognizer to the SfChart. Please refer to the following code example.

Code Example :

C#

TapGestureRecognizer tapGesture = new TapGestureRecognizer();
tapGesture.Tapped += (sender, e) =>
{
     //your code 
};
chart.GestureRecognizers.Add(tapGesture);


 
Thanks,
Magesh Kumar K

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;