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.
Syncfusion Feedback

How to zoom y axis or x axis alone?

To enable zooming feature in SfChart, add the ChartZoomPanBehavior instance to ChartBehaviors property of SfChart. This will allow you to zoom the chart both vertically and horizontally, by default. By using the ZoomMode property, you can specify whether the chart should be zoomed along any one direction (X or Y) or both directions (XY).

In the following code example, the ZoomMode property is set to Y. This will allow you to zoom only along y-axis while the zooming along x-axis is restricted.

XAML:

 

C#:

 

Article ID: Published Date: Last Revised Date: Platform: Control:
5549 11/03/2015 03/05/2018 Xamarin.Forms SfChart
Did you find this information helpful?
Comments
Jernej Leben Jun 28, 2017

How to zoom X and Y independently?

Reply
Luis David De La Cruz Bautista Apr 19, 2018

XAML

<chart:SfChart.ChartBehaviors>

     <chart:ChartZoomPanBehavior ZoomMode="XY"/>
chart:SfChart.ChartBehaviors>
C#
chart.ChartBehaviors.Add(new ChartZoomPanBehavior()
{
      ZoomMode = ZoomMode.XY
});
Reihaneh Khaksaran Jul 08, 2018

Hi,

is there anyway to detect zooming direction? I mean I want the zoom mode to be set to Y, if zooming is vertical and if zooming is horizontal, I want the zoom mode to be set on X, is that possible?

Reply
Add Comment
You must log in to leave a comment

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