Compartir a través de


ChartSheetBase.HeightPercent (Propiedad)

Obtiene o establece el alto de un gráfico 3D como un porcentaje del ancho de Microsoft.Office.Tools.Excel.ChartSheetBase.

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 HeightPercent As Integer
public int HeightPercent { get; set; }

Valor de propiedad

Tipo: System.Int32
Alto de un gráfico 3D como un porcentaje del ancho de Microsoft.Office.Tools.Excel.ChartSheetBase (entre el 5 y el 500 por ciento).

Ejemplos

El ejemplo de código siguiente utiliza la propiedad HeightPercent para establecer el alto del objeto Microsoft.Office.Tools.Excel.ChartSheetBase actual en 50 por ciento del ancho del objeto Microsoft.Office.Tools.Excel.ChartSheetBase.

Private Sub AdjustHeight()
    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.HeightPercent = 50
End Sub
private void AdjustHeight()
{
    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.HeightPercent = 50;
}

Seguridad de .NET Framework

Vea también

Referencia

ChartSheetBase Clase

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