DataLabelCollection.RemoveAt(Int32) Method
Removes the item at the specified index of the DataLabelCollection instance.
Namespace: DevExpress.Spreadsheet.Charts
Assembly: DevExpress.Spreadsheet.v18.2.Core.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
index | Int32 | A zero-based integer specifying the index of the item to remove. If it’s negative or exceeds the number of elements, an exception is raised. |
Remarks
The example below demonstrates how to remove the second series from the chart.
Note
A complete sample project is available at https://github.com/DevExpress-Examples/winforms-spreadsheet-chart-api-e5222
Dim worksheet As Worksheet = workbook.Worksheets("chartTask3")
workbook.Worksheets.ActiveWorksheet = worksheet
' Create a chart and specify its location.
Dim chart As Chart = worksheet.Charts.Add(ChartType.ColumnClustered, worksheet("B2:E6"))
chart.TopLeftCell = worksheet.Cells("H2")
chart.BottomRightCell = worksheet.Cells("N14")
' Remove the series.
chart.Series.RemoveAt(1)
See Also