xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xrchart-15a1e868.md
Provides access to the chart’s collection of series objects.
Namespace : DevExpress.XtraReports.UI
Assembly : DevExpress.XtraReports.v25.2.dll
NuGet Package : DevExpress.Reporting.Core
[SRCategory(ReportStringId.CatElements)]
public SeriesCollection Series { get; }
<SRCategory(ReportStringId.CatElements)>
Public ReadOnly Property Series As SeriesCollection
| Type | Description |
|---|---|
| SeriesCollection |
A SeriesCollection object that represents the collection of series.
|
The Series property provides access to a collection of all series which are defined explicitly within a chart control (either at design time or run time). The collection is represented by an instance of the SeriesCollection class and allows individual series (which are instances of the Series class) to be added, deleted and accessed using indexer notation.
Note that series which are bound to data at the level of a chart control (in particular, using the XRChart.DataSource, XRChart.SeriesDataMember and both the SeriesBase.ArgumentDataMember and SeriesBase.ValueDataMembers properties) are created dynamically based upon the data obtained from the specified data source and they are not presented within the Series collection. In order to access such series use the CustomDrawSeriesEventArgsBase.Series property of a chart control’s specific events (such as the XRChart.CustomDrawSeries or XRChart.CustomDrawSeriesPoint event, for instance). To perform a centralized customization of such series use the settings which are available via the XRChart.SeriesTemplate property.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Series 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.
reporting-winforms-salary-reports/CS/SalaryReports/Reports/ManagementReport.cs#L24
// Clears the filters that may be set before.
foreach (Series series in xrc.Series)
{
MultiPaneSettings settings = MultiPaneSettings.FromJson(chartItem.CustomProperties[customPropertyName]);
CustomizeDiagram(xrChart.Diagram as XYDiagram, xrChart.Series, settings);
}
reporting-winforms-salary-reports/VB/SalaryReports/Reports/ManagementReport.vb#L22
' Clears the filters that may be set before.
For Each series As Series In xrc.Series
series.DataFilters.Clear()
Dim settings As MultiPaneSettings = MultiPaneSettings.FromJson(chartItem.CustomProperties(customPropertyName))
CustomizeDiagram(TryCast(xrChart.Diagram, XYDiagram), xrChart.Series, settings)
End If
See Also