Propriedade ChartSheet.HeightPercent

Obtém ou define a altura de um gráfico 3D como uma porcentagem da Microsoft.Office.Tools.Excel.ChartSheet largura.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (em Microsoft.Office.Tools.Excel.dll)

Sintaxe

'Declaração
Property HeightPercent As Integer
    Get
    Set
int HeightPercent { get; set; }

Valor de propriedade

Tipo: System.Int32
A altura de um gráfico 3D como uma porcentagem da Microsoft.Office.Tools.Excel.ChartSheet largura (entre 5 e 500 por cento).

Exemplos

O seguinte exemplo de código usa a HeightPercent a propriedade para definir a altura do atual Microsoft.Office.Tools.Excel.ChartSheet a 50 por cento da largura da Microsoft.Office.Tools.Excel.ChartSheet.

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;
}

Segurança do .NET Framework

Consulte também

Referência

ChartSheet Interface

Namespace Microsoft.Office.Tools.Excel