corelibraries-devexpress-dot-xtracharts-dot-seriesbase-65b89d38.md
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.v25.2.dll
NuGet Package : DevExpress.Charts
[XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)]
public virtual bool ShowInLegend { get; set; }
<XtraChartsLocalizableCategory(XtraChartsCategory.Behavior)>
Public Overridable Property ShowInLegend As Boolean
| Type | Description |
|---|---|
| Boolean |
true to represent the data series in the legend; otherwise, false.
|
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:
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.
winforms-charts-show-chart-legend-with-markers-in-separate-control/CS/Form1.cs#L51
currentSeries = fakeSeries;
fakeSeries.ShowInLegend = true;
}
for (int i = 1; i < chart.Series.Count; ++i)
chart.Series[i].ShowInLegend = false;
}
winforms-charts-show-chart-legend-with-markers-in-separate-control/VB/Form1.vb#L47
currentSeries = fakeSeries
fakeSeries.ShowInLegend = True
Else
While i < Me.chart.Series.Count
Me.chart.Series(CInt((i))).ShowInLegend = False
Call System.Threading.Interlocked.Increment(i)
See Also