iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
The SCIYAxisDragModifier
SciChart iOS provides scale or pan an Y Axis via the SCIYAxisDragModifier, available out of the box.
Besides common features which are inherited from the SCIChartModifierBase class,
the SCIYAxisDragModifier allows to control its specific features via the following properties:
SCIAxisDragModifierBase.dragMode- allows to change the default axis scaling behavior to axis panning behavior - similarly to SCIyAxisDragModifier via theSCIAxisDragModeenumeration.SCIAxisDragModifierBase.minTouchArea- configures the sensitivity of the modifier.
Adding a SCIYAxisDragModifier to a Chart
Any Chart Modifier can be added to a SCIChartSurface via the ISCIChartSurface.chartModifiers property and SCIYAxisDragModifier is no difference:
Include/Exclude Certain Axis
The SCIYAxisDragModifier allows you to include or exclude certain axis from the axis drag operation.
This feature is especially useful in multiple-axis charts, where you may want to zoom/pan only selected axes while keeping others fixed.
By default all axis are included, to exclude one or more Y axis, set the following property:
NOTE: To learn more about features available, please visit the Chart Modifier APIs article.
SCIAxisDragModifier
SciChart has introduced a new modifier, SCIAxisDragModifier, which combines the functionality of both SCIXAxisDragModifier and SCIYAxisDragModifier.
This unified modifier allows you to configure drag behavior for the X-axis, Y-axis, or both axes simultaneously, eliminating the need to declare two separate modifiers.
Why Use SCIAxisDragModifier?
Previously, to enable drag interactions on both axes, you needed to add:
SCIXAxisDragModifier(for the X-axis), andSCIYAxisDragModifier(for the Y-axis)
With the new SCIAxisDragModifier, you can now accomplish the same behavior plus combined-axis dragging with one modifier.
NOTE: For new projects, SciChart recommends using
SCIAxisDragModifieras the preferred, modern, and more flexible approach to axis dragging.
View on GitHub