iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x

SciChart iOS Tutorial - Zooming and Panning Behavior

So far, we have created a 2D chart, added X and Y Axes, asd well as Line and Scatter Series.

In this SciChart iOS tutorial we’re going to add some interactivity to a 2D chart, so at the end we should be able to Zoom and Pan a chart as well as Zooming the Chart to the Data Extents.

Getting Started

This tutorial is suitable for Objective-C, Swift and C# with Xamarin.iOS.

NOTE: Source code for this tutorial can be found at our Github Repository:

First of all, make sure, you’ve read the Tutorial 01 - Create a simple Chart 2D and have a basic understanding of how to use SciChart.

Now, let’s extend previous tutorial with some Chart Modifiers


In SciChart, chart interactions are defined by the Chart Modifiers. In addition to the SciChart modifiers available out of the box, you can write custom modifiers or extends existing ones.

Here is the list of modifiers available out of the box in SciChart:

Adding Chart Modifiers

Now we are going to create and configure a couple of modifiers and add a set of them as modifier collection of the SCIChartSurface:

[self.surface.chartModifiers addAll:[SCIPinchZoomModifier new], [SCIZoomPanModifier new], [SCIZoomExtentsModifier new], nil];
self.surface.chartModifiers.add(items: SCIPinchZoomModifier(), SCIZoomPanModifier(), SCIZoomExtentsModifier())
Surface.ChartModifiers = new SCIChartModifierCollection { new SCIPinchZoomModifier(), new SCIZoomPanModifier(), new SCIZoomExtentsModifier() };

After running the application the chart should behave like below:

Where to Go From Here?

You can download the final project from our GitHub Repository:

Also, you can found next tutorial from this series here - SciChart iOS Tutorial - Tooltips and Legends

Of course, this is not the maximum of what you can achieve with the SciChart iOS. You can find more information about modifiers which are used in this tutorial in the articles below:

Also, you might want to read about Axes drag modifiers in the following articles:

Finally, start exploring. The SciChart iOS is quite extensive. You can look into our SciChart iOS Examples Suite which are full of 2D and 3D examples, which are also available on our GitHub