.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

ChartViewCollection Interface

A collection of chart views in a chart.

Namespace: DevExpress.Spreadsheet.Charts

Assembly: DevExpress.Spreadsheet.v20.2.Core.dll


public interface ChartViewCollection :
Public Interface ChartViewCollection
    Inherits ISimpleCollection(Of ChartView),
             IEnumerable(Of ChartView),


The ChartViewCollection collection is accessible by using the ChartObject.Views property.

Automatic Generation

The ChartViewCollection is generated automatically when the chart is created and its type and data are specified in the ChartCollection.Add method or the data are subsequently selected by using the ChartObject.SelectData method. In this case, the ChartViewCollection collection contains a single ChartView with multiple Series of the same ChartType.

Changing Series Type

When a series changes the type by using the Series.ChangeType method, the ChartViewCollection is rebuilt. If the new type is compatible with the type of the other series, a new view is created that includes the modified series. A new view is added to the ChartViewCollection. The resulting chart displays all views of compatible types.

Compatible types are listed below.

If the type of the new series is not compatible with types of other series, all views are cleared. A new view is automatically created with the type to which the series type has been recently changed and added to the ChartViewCollection. However, the data for the new series are obtained from the first element in the series collection. Thus, regardless of the series whose type is changed to incompatible, the chart will display the data from the first series using the incompatible chart type.

Secondary Axis

When a secondary axis is created for a series by using the Series.AxisGroup property, a new chart view containing secondary axis is created for that series and added to the ChartViewCollection.

Adding Series

When a new series is added to the ChartObject.Series collection, it is added to the view with the greatest index. To add a new series to a particular view (so that the series will be displayed using the required chart type), find the view with the required type in the ChartViewCollection and add a series to its ChartView.Series collection.

See Also