The SCIChartModifierBase API is by far the most powerful API in the SciChart library.
The SCIChartModifierBase provides an abstract base class for all of the 2D ChartModifiers within SciChart, all of our built-in 2D modifiers inherit from it.
Using this API, you can create behaviours which you can attach to a chart to perform custom Zooming, Panning, Annotation & Markers, Legend output and much much more.
Any time you want to do something to alter the behaviour of a SCIChartSurface you should be thinking about creating a custom modifier to do it.
Custom Chart Rotation Modifier
A simple example below shows how you can use SCIChartModifierBase API to create a chart rotation modifier.
Add it onto your chart like any other modifier to see how it works.
Let’s get to the code:
NOTE: It’s highly recommended to inherit from SCIChartModifierBase since it gives you some of the base implementation for free.
The common methods that are currently implemented and are not likely to be replaced can be found in the Chart Modifier APIs article.
For more information - please read the ISCIChartModifier API documentation.
NOTE: If you want to handle gestures in your custom ChartModifier, you could derive it from the SCIGestureModifierBase class, which provides base infrastructure for UIGestureRecognizer usage.
The SCIModifierEventArgs Type
If your custom ChartModifier requires to handle touch events or gestures, you might need to override the -[ISCIReceiveEvents onEvent:] method.
It receive the only parameter of the SCIModifierEventArgs type. This type exposes the following information about an event that occurred: