SeriesBase.ChangeView(ViewType) Method

Changes the series' view type by specifying its type.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v19.2.dll

Declaration

public void ChangeView(
    ViewType viewType
)
Public Sub ChangeView(
    viewType As ViewType
)

Parameters

Name Type Description
viewType ViewType

A ViewType enumeration value.

Remarks

The ChangeView method can be used to change the view type of a series object by specifying the required type of a series view.

A call to this method affects the value of the series' SeriesBase.View property.

Examples

The following example demonstrates how to programmatically change the current series view via the SeriesBase.ChangeView method. Note that this method is better than directly changing the SeriesBase.View property, because the ChangeView is implemented in a way that saves the property values of the old view to the greatest degree possible.

using DevExpress.XtraCharts;
// ...

public void ToPie(SeriesBase series) {
    series.ChangeView(ViewType.Pie);
}

public void ToBars(SeriesBase series) {
    series.ChangeView(ViewType.Bar);
}
See Also