Skip to content

FLUT-962617 - [Feature] UG content for Directional Zooming #1236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
12 commits merged into from
Jun 18, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions Flutter/cartesian-charts/zoom-pan.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,50 @@ Pinch zooming can be enabled by [`enablePinching`](https://pub.dev/documentation
{% endhighlight %}
{% endtabs %}

## Directional zooming

The directional zooming feature improves the zoom experience by allowing you to zoom in and out in a specific direction. To enable this feature, set the [`enableDirectionalZooming`]() property to `true`, the default value is `false`.

Additionally, ensure that `pinch zooming` is enabled and the `zoomMode` is set to `ZoomMode.xy` for directional zooming to work. The following code sample demonstrates how to enable directional zooming.

{% tabs %}
{% highlight dart hl_lines="7" %}

late ZoomPanBehavior _zoomPanBehavior;

@override
void initState(){
_zoomPanBehavior = ZoomPanBehavior(
// Enables directional zooming
enableDirectionalZooming: true,
enablePinching: true,
zoomMode: ZoomMode.xy,
);
super.initState();
}

@override
Widget build(BuildContext context) {
return Scaffold(
body: SafeArea(
child: Center(
child: Container(
height: 300,
width: 350,
child: SfCartesianChart(
zoomPanBehavior: _zoomPanBehavior
)
)
)
)
);
}

{% endhighlight %}
{% endtabs %}

![Directional Zooming](images/zooming-panning/directional-zooming.gif)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image does not have quality.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed gif which has quality.


## Double tap zooming

Double tap zooming can be enabled using [`enableDoubleTapZooming`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/ZoomPanBehavior/enableDoubleTapZooming.html) property. Defaults to `false`.
Expand Down