A ChartType enumeration specifying the chart type used to plot the series.
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.
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.
' Use the secondary axis.
chart.Series(1).AxisGroup = AxisGroup.Secondary
' Specify the position of the legend.
chart.Legend.Position = LegendPosition.Top
Worksheet worksheet = workbook.Worksheets["chartTask5"];
workbook.Worksheets.ActiveWorksheet = worksheet;
// Create a chart and specify its location.
Chart 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.
// Use the secondary axis.
chart.Series.AxisGroup = AxisGroup.Secondary;
// Specify the position of the legend.
chart.Legend.Position = LegendPosition.Top;