SciChart iOS v2.x API > ChartModifier API > Zooming and Panning > SCIYAxisDragModifier
SCIYAxisDragModifier

The SCIYAxisDragModifier allows you to add Y-Axis scaling or panning on drag of the axis.

Examples for the YAxisDragModifier can be found in the SciChart iOS Examples Suite.

Declaring a SCIYAxisDragModifier in Code

SCIYAxisDragModifier * yDragModifier = [SCIYAxisDragModifier new];
yDragModifier.axisId = @"yAxis";
yDragModifier.dragMode = SCIAxisDragMode_Pan;
[yDragModifier setModifierName:@"YAxis DragModifier"];
[surface.chartModifiers add: yDragModifier];
let yAxisDragmodifier = SCIYAxisDragModifier()
yAxisDragmodifier.modifierName = "yAxisDragModifierName"
yAxisDragmodifier.axisId = "yAxis"
yAxisDragmodifier.dragMode = .Pan
chartSurface.chartModifiers.add(yAxisDragmodifier

Switching from YAxis Drag to Pan Mode

The property SCIYAxisDragModifier.DragMode allows you to switch between Panning and Scaling on drag of an axis.

yDragModifier.dragMode = SCIAxisDragMode_Pan;
yDragModifier.dragMode = SCIAxisDragMode_Scale;
yAxisDragmodifier.dragMode = .Pan
yAxisDragmodifier.dragMode = .Scale

See Also