Skip to main content

SeriesBase.ShowInLegend Property

Gets or sets a value that specifies whether the data series is represented in the chart control’s legend.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v24.2.dll

Declaration

[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
public virtual bool ShowInLegend { get; set; }

Property Value

Type Description
Boolean

true to represent the data series in the legend; otherwise, false.

Remarks

Use the ShowInLegend property to control whether the data series is indicated within the chart control’s legend.

Note that if this property is customized at the level of a series template object (which is accessed via the ChartControl.SeriesTemplate/WebChartControl.SeriesTemplate property), it controls the indication of all automatically generated series within the legend of the chart control in the following manner:

  • If this property is set to true, each data series from the bound data source (which is specified via the ChartControl.DataSource property) is represented within the legend and can be identified by its color (if legend markers are visible due to the Legend.MarkerVisible property’s setting) and its name (which is taken from the data source’s field specified via the ChartControl.SeriesDataMember property).
  • If the ShowInLegend property is set to false, none of the data series obtained from the chart control’s data source is represented within the legend.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ShowInLegend property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also