iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
SCIProjectionCollection
@interface SCIProjectionCollection<__covariant T, __covariant TSource>
: SCIObservableCollection <T>
Defines special read-only collection which projects items of one collection into another collection according to specified transform function.
Note
T
- is the type of items to project to.
Note
TSource
- is the type of source items which need to be projected.
-
Creates a new
SCIProjectionCollection
instance with specified projection function.Declaration
Objective-C
- (nonnull instancetype)initWithProjectionFunc:(nonnull SCIFunc1)func;
Swift
init(projectionFunc func: @escaping SCIFunc1)
Parameters
func
The function which transforms item from source collection to target item.
-
Creates a new
SCIProjectionCollection
instance with specified projection function.Declaration
Objective-C
- (nonnull instancetype)initWithSourceCollection: (nonnull SCIObservableCollection *)collection projectionFunc:(nonnull SCIFunc1)func;
Swift
init(sourceCollection collection: SCIObservableCollection<AnyObject>, projectionFunc func: @escaping SCIFunc1)
Parameters
collection
The source collection to project from.
func
The function which transforms item from source collection to target item.
-
Defines the source collection which is used to project from.
Declaration
Objective-C
@property (nonatomic, weak) SCIObservableCollection<TSource> *_Nullable sourceCollection;
Swift
weak var sourceCollection: SCIObservableCollection<TSource>? { get set }