iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
SCILegendDataSource
@interface SCILegendDataSource : NSObject <UICollectionViewDataSource>
Defines the dataSource for SCIChartLegend.
-
Gets or sets the list of series info to display in
SCIChartLegend.Declaration
Objective-C
@property (nonatomic, strong) SCIObservableCollection *_Nonnull dataSet;Swift
var dataSet: SCIObservableCollection<AnyObject> { get set } -
Gets the xib name which is used to register nib for cell with reuse identifier, which later used to dequeue the legend items.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *legendItemXibName;Swift
var legendItemXibName: String? { get } -
Gets the bundle which is used to load cell nib.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSBundle *bundle;Swift
var bundle: Bundle? { get } -
Gets the class which is used to register class for cell with reuse identifier, which later used to dequeue the legend items.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) Class legendItemClass;Swift
var legendItemClass: AnyClass? { get } -
Creates a new instance of the
SCILegendDataSourceclass.Declaration
Objective-C
- (nonnull instancetype)initWithLegend: (nonnull UICollectionView<ISCIChartLegend> *)legend legendItemXibName:(nullable NSString *)legendItemXibName bundle:(nonnull NSBundle *)bundle;Swift
init(legend: any UICollectionView & ISCIChartLegend, legendItemXibName: String?, bundle: Bundle)Parameters
legendThe
SCIChartLegendwhith which this data source is associated.legendItemXibNameThe xib name which is used to register nib for cell with reuse identifier, which later used to dequeue the legend items. Assosiated class of this view must conform to
ISCILegendItem. -
Creates a new instance of the
SCILegendDataSourceclass.Declaration
Objective-C
- (nonnull instancetype)initWithLegend: (nonnull UICollectionView<ISCIChartLegend> *)legend legendItemClass:(nullable Class)cellClass;Swift
init(legend: any UICollectionView & ISCIChartLegend, legendItemClass cellClass: AnyClass?)Parameters
legendThe
SCIChartLegendwhith which this data source is associated.cellClassThe class name which is used to register class for cell with reuse identifier, which later used to dequeue the legend items. Assosiated class of this view must conform to
ISCILegendItem. -
Registers observer to listen for changes on this
SCILegendDataSourceinstance.Declaration
Objective-C
- (void)registerDataSourceObserver: (nonnull id<ISCILegendDataSourceObserver>)dataSourceObserver;Swift
func registerDataSourceObserver(_ dataSourceObserver: any ISCILegendDataSourceObserver)Parameters
dataSourceObserverThe observer to deregister.
-
Deregisters observer from listening changes on this
SCILegendDataSourceinstance.Declaration
Objective-C
- (void)unregisterDataSourceObserver: (nonnull id<ISCILegendDataSourceObserver>)dataSourceObserver;Swift
func unregisterDataSourceObserver(_ dataSourceObserver: any ISCILegendDataSourceObserver)Parameters
dataSourceObserverThe observer to deregister.
View on GitHub