Articles in this section
Category / Section

How to perform exclusive zoom for an individual axis in .NET MAUI Cartesian Chart?

2 mins read

This article will guide you in enabling exclusive zoom for an individual axis in the .NET MAUI Chart.
Create an instance of ChartZoomPanBehavior and set it to the ZoomPanBehavior property of SfCartesianChart to enable zooming in the chart.
The zooming can be done both horizontally and vertically. The zooming direction is defined 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 the y-axis, while the zooming along the x-axis is restricted.

[XAML]

<chart:SfCartesianChart>
    <chart:SfCartesianChart.ZoomPanBehavior>
        <chart:ChartZoomPanBehavior ZoomMode="Y" />
    </chart:SfCartesianChart.ZoomPanBehavior>
    ...
</chart:SfCartesianChart>

[C#]

SfCartesianChart chart = new SfCartesianChart();
...
ChartZoomPanBehavior zooming = new ChartZoomPanBehavior()
{
    ZoomMode = ZoomMode.Y
};

chart.ZoomPanBehavior = zooming;
...

Output

ZoomingMode.gif

Conclusion
I hope you enjoyed learning how to enable exclusive zoom for an individual axis in the .NET MAUI Chart.

You can refer to our .NET MAUI Cartesian Chart feature tour page to learn about its other groundbreaking feature representations. Explore our .NET MAUI Chart documentation to understand how to present and manipulate data.
For current customers, check out our components from the License and Downloads page. If you are new to Syncfusion®, try our 30-day free trial to check out our other controls.
Please let us know in the comments section if you have any queries or require clarification. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied