How to zoom y axis or x axis alone in Xamarin Charts?
To enable zooming feature in Xamarin Chart, 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:
<chart:SfChart.ChartBehaviors> <chart:ChartZoomPanBehavior ZoomMode="Y"/> </chart:SfChart.ChartBehaviors>
C#:
chart.ChartBehaviors.Add(new ChartZoomPanBehavior() { ZoomMode = ZoomMode.Y });
I hope you enjoyed learning about how to zoom y axis or x axis alone in Xamarin Charts.
You can refer to our Xamarin Chart’s feature tour page to know about its other groundbreaking feature representations. You can also explore our Xamarin Chart Documentation to understand how to present and manipulate data.
For current customers, you can check out our Xamarin components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our Xamarin Chart and other Xamarin components.
If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, Direct-Trac or feedback portal. We are always happy to assist you!