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.
Besides common features which are inherited from the SCIChartModifierBase class,
the SCIXAxisDragModifier 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 SCIxAxisDragModifier via theSCIAxisDragModeenumeration.SCIAxisDragModifierBase.minTouchArea- configures the sensitivity of the modifier.SCIXAxisDragModifier.clipModeX- allows to specify the behavior when scrolling reaches data extents in X direction via theSCIClipModeenumeration.SCIXAxisDragModifier.clipModeTargetX- allows to specify which target is used as limit byclipModeXwhen you reach the edge of theX-Axisextents.
Adding a SCIXAxisDragModifier to a Chart
Any Chart Modifier can be added to a SCIChartSurface via the ISCIChartSurface.chartModifiers property and SCIXAxisDragModifier with no difference:
Include/Exclude Certain Axis
The SCIXAxisDragModifier 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 X 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