iOS Charting Documentation - SciChart iOS Charts SDK v3.x

SCILegendDataSource

@interface SCILegendDataSource
    : NSObject <UICollectionViewDataSource, ISCILegendDataSourceObserver>

Defines the dataSource for SCIChartLegend.

  • Gets or sets the list of series info to display in SCIChartLegend.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic)
        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 (readonly, nonatomic) NSString *_Nonnull legendItemXibName;

    Swift

    var legendItemXibName: String { get }
  • Creates a new instance of the SCILegendDataSource class.

    Declaration

    Objective-C

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

    Swift

    init(legend: UICollectionView & ISCIChartLegend, legendItemXibName: String?)

    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.