The YAxisDragModifier
SciChart Android provides scale or pan an X Axis via the YAxisDragModifier, available out of the box.
Besides common features which are inherited from the ChartModifierBase class, the YAxisDragModifier allows to control its specific features via the following properties:
- setDragMode(AxisDragModifierBase.AxisDragMode dragMode) - allows to change the default axis scaling behavior to axis panning behavior - similarly to ZoomPanModifier via the AxisDragModifierBase.AxisDragMode enumeration.
- setMinTouchArea(float minTouchArea) - configures the sensitivity of the modifier.
Adding a YAxisDragModifier to a Chart
Any Chart Modifier can be added to a SciChartSurface via the chartModifiers property and YAxisDragModifier is no difference:
// Assume a surface has been created and configured somewhere
// Create a Modifier
final YAxisDragModifier yAxisDragModifier = new YAxisDragModifier();
yAxisDragModifier.setDragMode(AxisDragModifierBase.AxisDragMode.Pan);
// Add the modifier to the surface
surface.getChartModifiers().add(yAxisDragModifier);
Note
To learn more about features available, please visit the Chart Modifier APIs article.