How To Zoom And Pan In The .NET MAUI Cartesian Chart

Sample date Updated on Sep 13, 2025
chart-zoomin charts data-visualization double-tap-zooming enable-panning interactive-charts maui-charts pinch-zooming selection-rect selection-zooming zoom-pan-behavior zooming-and-panning

This repository contains a sample project demonstrating how to implement zoom and pan functionality in the .NET MAUI Cartesian Chart.

Zoom and Pan

The .NET MAUI Cartesian Chart provides a powerful way to visualize data with enhanced interactivity through zooming and panning functionalities. This sample demonstrates how to enable zooming and panning in a Cartesian chart to allow users to interact with and closely examine the chart data.

ZoomPanBehavior: Adds zoom and pan capabilities to the chart.

EnableSelectionZooming: Allows the user to zoom into a selected area of the chart.

SelectionRectFill: Sets the fill color of the selection rectangle used for zooming.

SelectionRectStroke: Sets the border color of the selection rectangle.

SelectionRectStrokeWidth: Specifies the thickness of the selection rectangle's border.

By utilizing these properties, you can create a highly interactive chart that allows users to focus on specific data points and navigate through the chart with ease.

Troubleshooting

Path too long exception

If you are facing a path too long exception when building this example project, close Visual Studio and rename the repository to short and build the project.

Up arrow