_Chart.SetElement Method

Sets chart elements on a chart. Read/write.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

void SetElement(
	MsoChartElementType Element


Type: Microsoft.Office.Core.MsoChartElementType

Specifies the chart element type.

For charts, the following commands in the Layout tab correspond to the SetElement(MsoChartElementType) method:

  • Everything in the Labels group.

  • Everything in the Axes group.

  • Everything in the Analysis group.

  • PlotArea, Chart Wall, and Chart Floor buttons.

MsoChartElementType is an enumeration of constants that refer to all of the above commands.