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

The SCIXAxisDragModifier

SciChart iOS provides scale or pan an X Axis via the SCIXAxisDragModifier, available out of the box.

X-Axis Drag Modifier

Besides common features which are inherited from the SCIChartModifierBase class, the SCIXAxisDragModifier allows to control its specific features via the following properties:

Adding a SCIYAxisDragModifier to a Chart

Any Chart Modifier can be added to a SCIChartSurface via the ISCIChartSurface.chartModifiers property and SCIYAxisDragModifier with no difference:

// Assume a surface has been created and configured somewhere id<ISCIChartSurface> surface; // Create a Modifier SCIXAxisDragModifier *xAxisDragModifier = [SCIXAxisDragModifier new]; xAxisDragModifier.dragMode = SCIAxisDragMode_Pan; xAxisDragModifier.clipModeX = SCIClipMode_StretchAtExtents; xAxisDragModifier.clipModeTargetX = SCIClipModeTarget_MaximumRange; // Add the modifier to the surface [self.surface.chartModifiers add:xAxisDragModifier];
// Assume a surface has been created and configured somewhere let surface: ISCIChartSurface // Create a Modifier let xAxisDragModifier = SCIXAxisDragModifier() xAxisDragModifier.dragMode = .pan xAxisDragModifier.clipModeX = .stretchAtExtents xAxisDragModifier.clipModeTargetX = .maximumRange // Add the modifier to the surface self.surface.chartModifiers.add(xAxisDragModifier)
// Assume a surface has been created and configured somewhere IISCIChartSurface surface; // Create a Modifier var xAxisDragModifier = new SCIXAxisDragModifier(); xAxisDragModifier.DragMode = SCIAxisDragMode.Pan; xAxisDragModifier.ClipModeX = SCIClipMode.StretchAtExtents; xAxisDragModifier.ClipModeTargetX = SCIClipModeTarget.MaximumRange; // Add the modifier to the surface Surface.ChartModifiers.Add(xAxisDragModifier);

NOTE: To learn more about features available, Chart Modifier APIs article.