iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
The SCIPinchZoomModifier
SciChart iOS provides pinch zooming via the SCIPinchZoomModifier
, available out of the box.
Besides common features which are inherited from the SCIChartModifierBase
class,
the SCIPinchZoomModifier
allows to control its specific features via the following properties:
SCIPinchZoomModifier.scaleFactor
- allows to set ScaleFactor to change zooming speed.SCIPinchZoomModifier.direction
- allows to restrict zooming to the horizontal or vertical direction only if needed.
Adding a SCIPinchZoomModifier to a Chart
Any Chart Modifier can be added to a SCIChartSurface
via the ISCIChartSurface.chartModifiers
property and SCIPinchZoomModifier
with no difference:
// Assume a surface has been created and configured somewhere
id<ISCIChartSurface> surface;
// Create a Modifier
SCIPinchZoomModifier *pinchZoomModifier = [SCIPinchZoomModifier new];
pinchZoomModifier.direction = SCIDirection2D_XDirection;
pinchZoomModifier.scaleFactor = 1.5;
// Add the modifier to the surface
[self.surface.chartModifiers add:pinchZoomModifier];
// Assume a surface has been created and configured somewhere
let surface: ISCIChartSurface
// Create a Modifier
let pinchZoomModifier = SCIPinchZoomModifier()
pinchZoomModifier.direction = .xDirection
pinchZoomModifier.scaleFactor = 1.5
// Add the modifier to the surface
self.surface.chartModifiers.add(pinchZoomModifier)
// Assume a surface has been created and configured somewhere
IISCIChartSurface surface;
// Create a Modifier
var pinchZoomModifier = new SCIPinchZoomModifier();
pinchZoomModifier.Direction = SCIDirection2D.XDirection;
pinchZoomModifier.scaleFactor = 1.5;
// Add the modifier to the surface
Surface.ChartModifiers.Add(pinchZoomModifier);
NOTE: To learn more about features available, please visit the Chart Modifier APIs article.