ChartStyle Property

ChartSheetBase.ChartStyle Property


Gets or sets the style of the chart.

Namespace:   Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

public object ChartStyle { get; set; }

Property Value

Type: System.Object

An integer from 1 through 48 that represents the style of the chart.

The values of the ChartStyle property correspond to the available options on the Chart Styles group on the Design tab on the Ribbon. The Design tab is available when you select a chart.

The following code example specifies the colors of the walls and floor of an existing 3-D chart sheet and sets the chart style to style 4. To run this code example, the workbook must contain a chart sheet called Chart1 of a 3-D type.

private void SetChartSheetDesign()
    // Add a new chart and populate source data
    Microsoft.Office.Tools.Excel.ChartSheet myChartSheet =

    myChartSheet.BackWall.Format.Fill.ForeColor.RGB =
    myChartSheet.SideWall.Format.Fill.ForeColor.RGB =
    myChartSheet.Floor.Format.Fill.ForeColor.RGB =

    myChartSheet.ChartStyle = 4;
Return to top
© 2015 Microsoft