Pre loader

Android Pan Y or X Direction Example

Android Chart - Examples

SciChart Android ships with ~90 Android Chart Examples which you can browse, play with, view the source-code and even export each SciChart Android Chart Example to a stand-alone Android Studio project. All of this is possible with the new and improved SciChart Android Examples Suite, which ships as part of our Android Charts SDK.

Download Scichart Android

Demonstrates using the ZoomPanModifier, part of the ChartModifier API, which allows panning the chart while dragging a chart with a finger. It causes the viewport to pan.


– Calling the setXyDirection() method, panning may be limited to the X Direction, Y Direction or XY (both) directions.

– With the setZoomExtentsY() method, the behavior can be changed so the YAxis zooms to extents as you pan. This is useful for trading charts.

– With the setClipModeX() method, you can control how the series behaves as you pan to the edge of the data. The default mode is ClipMode.StretchAtExtents, which causes a zooming (stretch) action when you reach the edge of the data.

The full source code for the Android Pan Y or X Direction example is included below (Scroll down!).

Did you know you can also view the source code from one of the following sources as well?

  1. Clone the SciChart.Android.Examples from Github.
  2. Or, view source and export each example to an Android Studio project from the Java version of the SciChart Android Examples app.
  3. Also the SciChart Android Trial contains the full source for the examples (link below).


Kotlin: PanAndZoomChartFragment.kt
View source code
View source code
Back to Android Chart Examples

Android Chart Examples

2D Charts
3D Charts
Featured Apps