.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

Series.ChangeType(ChartType) Method

Changes the chart type used to plot the series.

Namespace: DevExpress.Spreadsheet.Charts

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

Declaration

void ChangeType(
    ChartType chartType
)
Sub ChangeType(
    chartType As ChartType
)
void ChangeType(
    ChartType chartType
)
Sub ChangeType(
    chartType As ChartType
)
void ChangeType(
    ChartType chartType
)
Sub ChangeType(
    chartType As ChartType
)

Parameters

Name Type Description
chartType ChartType

A ChartType enumeration specifying the chart type used to plot the series.

Parameters

Name Type Description
chartType ChartType

A ChartType enumeration specifying the chart type used to plot the series.

Parameters

Name Type Description
chartType ChartType

A ChartType enumeration specifying the chart type used to plot the series.

Remarks

The chart type used to plot the series (Series.SeriesType) is the same as the ChartView.ViewType of the Series.View to which a series belongs. When the ChangeType changes the series type, it also creates a new ChartView if the view of the specified type does not exist, or moves the series to an existing view of the same type.

Note

The series with the changed chart type has display priority over other series. If the modified series cannot be displayed in the combination chart with other series, the chart displays a view containing this series only.

Dim worksheet As Worksheet = workbook.Worksheets("chartTask5")
workbook.Worksheets.ActiveWorksheet = worksheet

' Create a chart and specify its location.
Dim chart As Chart = worksheet.Charts.Add(ChartType.LineMarker, worksheet("B2:D8"))
chart.TopLeftCell = worksheet.Cells("F2")
chart.BottomRightCell = worksheet.Cells("L15")

' Change the type of the second series.
chart.Series(1).ChangeType(ChartType.ColumnClustered)

' Use the secondary axis.
chart.Series(1).AxisGroup = AxisGroup.Secondary

' Specify the position of the legend.
chart.Legend.Position = LegendPosition.Top
See Also