iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
Custom Modifiers - the SCIChartModifierBase API
SCIChartModifierBase API is by far the most powerful API in the SciChart library.
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
SCIChartModifierBasesince it gives you some of the base implementation for free.
The modifier above allows to rotate a chart when added to its
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
SCIGestureModifierBaseclass, which provides base infrastructure for
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:
||Provides the source of the event, of the
||Gets whether the event occurred on the ParentSurface or was propagated through EventGroup.|
||Reports whether the event occurred within the Source.|
||Reports whether the event has been already passed to any other modifier and handled by it.|
NOTE: To receive handled events, set
ISCIReceiveEvents.receiveHandledEventson a modifier to