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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Zooming and Panning in Xamarin.Android

Thread ID:

Created:

Updated:

Platform:

Replies:

120884 Oct 25,2015 12:25 AM UTC Oct 26,2015 11:15 AM UTC Xamarin.Android 1
loading
Tags: SfChart
Cathryn McDonald
Asked On October 25, 2015 12:25 AM UTC

How do you enable zooming and panning in Xamarin.Android? Android and Xamarin.Forms both have a ChartZoomPanBehaviour class, but this class seems to be missing in Xamarin.Android.

Yuvaraj Palanisamy [Syncfusion]
Replied On October 26, 2015 11:15 AM UTC

Hi Cathryn,


Thanks for using Syncfusion products.


We have ChartZoomPanBehavior class in the Xamarin.Android. Also, please refer to the following code example to enable the chart zooming in the Xamarin.Android, Xamarin.Forms and Android platforms.


Xamarin.Android[C#]

SfChart chart = new SfChart();
chart.Behaviors.Add(new ChartZoomPanBehavior());


Xamarin.Forms[C#]

SfChart chart = new SfChart();
chart.ChartBehaviors.Add(new ChartZoomPanBehavior());


Xamarin.Forms [XAML]
<chart:SfChart HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
    <chart:SfChart.ChartBehaviors>
        <chart:ChartZoomPanBehavior/>
    </chart:SfChart.ChartBehaviors>
</chart:SfChart>

Android[Java]

SfChart chart = new SfChart();
chart.getBehaviors.add(new ChartZoomPanBehavior());


Thanks,
Yuvaraj

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.

Warning Icon 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.Close Icon

;