)
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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to zoom y axis or x axis alone?

Platform: Xamarin.Forms |
Control: SfChart |
Published Date: November 3, 2015 |
Last Revised Date: March 5, 2018
Tags: chart, zoom, x-axis, y-axis

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#:

 

2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment
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

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile
Live Chat Icon