Axis APIs - Programmatically Zoom, Scroll
Programmatically Scrolling an Axis
SciChart provides a clean and [simple APIs](Chart Modifier APIs.html) to interact with a single Axis programmatically, e.g. to Zoom, Scroll or Pan an axis. This can come in useful when creating custom ChartModifierBase derived classes e.g. custom zooming or panning of the chart.
IAxis Interactivity Methods
The following methods can be found on IAxis and AxisBase<T>, a shared base-class for 2D Axis types in SciChart:
- scroll(float pixelsToScroll, ClipMode clipMode)
- scroll(float pixelsToScroll, ClipMode clipMode, long duration)
- scroll(float pixelsToScroll, ClipMode clipMode, ClipModeTarget clipTarget)
- scroll(float pixelsToScroll, ClipMode clipMode, ClipModeTarget clipTarget, long duration)
- zoom(float fromCoordinate, float toCoordinate)
- zoom(float fromCoordinate, float toCoordinate, long duration)
- zoomBy(double minFraction, double maxFraction)
- zoomBy(double minFraction, double maxFraction, long duration)
Using these methods you can programmatically zoom, scroll (pan) a specific axis. You can read more information about the above methods in API documentation.