Share via


ChartSheetBase.BarShape (Propiedad)

Obtiene o establece la forma utilizada con el objeto Microsoft.Office.Tools.Excel.ChartSheetBase de barra o columna en 3D.

Espacio de nombres:  Microsoft.Office.Tools.Excel
Ensamblado:  Microsoft.Office.Tools.Excel.v4.0.Utilities (en Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

Sintaxis

'Declaración
Public Property BarShape As XlBarShape
    Get
    Set
public XlBarShape BarShape { get; set; }

Valor de propiedad

Tipo: Microsoft.Office.Interop.Excel.XlBarShape
Uno de los valores de XlBarShape.

Ejemplos

El ejemplo de código siguiente utiliza la propiedad BarShape del objeto Microsoft.Office.Tools.Excel.ChartSheetBase actual para mostrar las barras como cilindros.

Private Sub SetBarShape()
    Globals.Sheet1.Range("A1", "A5").Value2 = 22
    Globals.Sheet1.Range("B1", "B5").Value2 = 55

    Me.SetSourceData(Globals.Sheet1.Range("A1", "B5"), _
        Excel.XlRowCol.xlColumns)
    Me.ChartType = Excel.XlChartType.xl3DBarClustered
    Me.BarShape = Excel.XlBarShape.xlCylinder
End Sub
private void SetBarShape()
{
    Globals.Sheet1.Range["A1", "A5"].Value2 = 22;
    Globals.Sheet1.Range["B1", "B5"].Value2 = 55;

    this.SetSourceData(Globals.Sheet1.Range["A1", "B5"],
        Excel.XlRowCol.xlColumns);
    this.ChartType = Excel.XlChartType.xl3DBarClustered;

    this.BarShape = Excel.XlBarShape.xlCylinder;
}

Seguridad de .NET Framework

Vea también

Referencia

ChartSheetBase Clase

Microsoft.Office.Tools.Excel (Espacio de nombres)