
iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
SciChart v4 Migration guide
SciChart v4.0 is the latest major release of SciChart - High-Performance Real-time Charts framework for iOS.
This guide is provided to ease the transition of existing applications using SciChart v3.0 to the latest APIs, as well as explain the design and structure of new and updated functionality.
Table of contents
Benefits of Upgrading
- SciChart library starts to support macOS
- All the API was improved, became more flexible and more consistent with other platforms
- A lot of bug fixes
- Whole SciChart API became even more Swift-friendly
Breaking Changes
In version 4.x iOS SciChart library has started to support macOS. API hasn’t changed dramatically except Pie/Donut API which has been rewritten completely to match other platforms. Also, SciChart API has been slightly updated to improve flexibility, Swift compatibility, and become consistent with other platforms. There’s no possibility to document every single change, so we’re going to attempt to identify the most commonly used parts of SciChart and describe what has been changed there.
Pie/Donut API
In version 4.x Pie/Donut API has been rewritten completely to match other platforms, for example:
SCIPieRenderableSeries
andSCIDonutRenderableSeries
segments
becamesegmentsCollection
SCIPieLegendModifier
becameSCIPieChartLegendModifier
SCIPieSelectionModifier
becameSCIPieSegmentSelectionModifier
SCIPieSelectionModifier.selectionMode
removedSCIPieTooltipModifier
becameSCIPieChartTooltipModifier
Custom theme applying
In version 4.x you can to add your custom themes from different bundles like this:
Minor API changes
- Some methods and properties have been changed to non-optional:
- SciChart v3.x:
UIColor.fromARGBColorCode(0xffff4500)?.cgColor
- SciChart v4.x:
UIColor.fromARGBColorCode(0xffff4500).cgColor
- SciChart v3.x:
SCIAnnotationDragListener
has been changed to `ISCIAnnotationDragListenerISCIAxis
methods parameters have been changed fromdouble
toCGFloat
like this:- SciChart v3.x:
- (void)zoomFrom:(double)fromCoord to:(double)toCoord
- SciChart v4.x:
- (void)zoomFrom:(CGFloat)fromCoord to:(CGFloat)toCoord
- SciChart v3.x:
SCIModifierBehavior+Protected.lastUpdatePoint
has been removed. InsteadSCIGestureModifierEventArgs.lastUpdateArgs
has been added. So, now you can uselastUpdateArgs.location
to get a location at which the associated gesture occurred.SCIModifierGroup.eventGroup
has been removed. InsteadISCIChartModifierCore.eventsGroupTag
preperty has been added. So, in case you want to sync your modifier between charts you seteventsGroupTag
to some string like this:
[SCIGestureModifierBase+Protected internalHandleGesture:]
method has been replaced with four separate methods which handle each gesture state separately like this:
NOTE: In case you want to handle all gesture recognizer states in one plase, you can override
- (void)onEvent:(SCIGestureModifierEventArgs *)args
method;