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;
  • 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;
  • Gets the bundle which is used to load cell nib.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) NSBundle *bundle;
  • 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;
  • Creates a new instance of the SCILegendDataSource class.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLegend:
                                (nonnull UICollectionView<ISCIChartLegend> *)legend
                         legendItemXibName:(nullable NSString *)legendItemXibName
                                    bundle:(nonnull NSBundle *)bundle;

    Parameters

    legend

    The SCIChartLegend whith which this data source is associated.

    legendItemXibName

    The 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 SCILegendDataSource class.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLegend:
                                (nonnull UICollectionView<ISCIChartLegend> *)legend
                           legendItemClass:(nullable Class)cellClass;

    Parameters

    legend

    The SCIChartLegend whith which this data source is associated.

    cellClass

    The 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 SCILegendDataSource instance.

    Declaration

    Objective-C

    - (void)registerDataSourceObserver:
        (nonnull id<ISCILegendDataSourceObserver>)dataSourceObserver;

    Parameters

    dataSourceObserver

    The observer to deregister.

  • Deregisters observer from listening changes on this SCILegendDataSource instance.

    Declaration

    Objective-C

    - (void)unregisterDataSourceObserver:
        (nonnull id<ISCILegendDataSourceObserver>)dataSourceObserver;

    Parameters

    dataSourceObserver

    The observer to deregister.