iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x

SCILegendModifier

@interface SCILegendModifier : SCIChartModifierBase <ISCIThemeable>

Defines a custom chart modifier which shows a Legend on the SCIChartSurface and also can provide a data-source via sourceMode property.

  • Gets or sets the position of the current SCILegendModifier instance.

    Declaration

    Objective-C

    @property (nonatomic) SCIAlignment position;
  • Gets or sets the margins to position of the current ‘SCILegendModifier’ instance

    Declaration

    Objective-C

    @property (nonatomic) UIEdgeInsets margins;
  • Gets or sets the orientation of the current SCILegendModifier instance.

    Declaration

    Objective-C

    @property (nonatomic) SCIOrientation orientation;
  • Gets or sets whether the legend should be displayed.

    Declaration

    Objective-C

    @property (nonatomic) BOOL showLegend;
  • Gets or sets whether the legend should display checkboxes.

    Declaration

    Objective-C

    @property (nonatomic) BOOL showCheckBoxes;
  • Gets or sets whether the legend should display series markers.

    Declaration

    Objective-C

    @property (nonatomic) BOOL showSeriesMarkers;
  • Gets or sets the SCISourceMode value for legend.

    Declaration

    Objective-C

    @property (nonatomic) SCISourceMode sourceMode;
  • Creates a new instance of SCILegendModifier class.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLegend:(nonnull SCIChartLegend *)legend;

    Parameters

    legend

    The SCIChartLegend instance which should be used by this modifier.

  • Creates a new instance of SCILegendModifier class.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLegend:(nonnull SCIChartLegend *)legend
                                dataSource:(nonnull SCILegendDataSource *)dataSource
                          useAutoPlacement:(BOOL)useAutoPlacement;

    Parameters

    legend

    The SCIChartLegend instance which should be used by this modifier.

    dataSource

    The SCILegendDataSource instance which should be used by legend.

    useAutoPlacement

    If true modifier will try to place legend inside chart, otherwise legend is already placed somewhere and shouldn’t be moved.

  • Refreshes content of the legend with up-to-date values

    Declaration

    Objective-C

    - (void)updateLegend;