Share via


ChartSheetBase.HeightPercent Property

Definition

Gets or sets the height of a 3-D chart as a percentage of the ChartSheetBase width.

public:
 property int HeightPercent { int get(); void set(int value); };
public int HeightPercent { get; set; }
member this.HeightPercent : int with get, set
Public Property HeightPercent As Integer

Property Value

The height of a 3-D chart as a percentage of the ChartSheetBase width (between 5 and 500 percent).

Examples

The following code example uses the HeightPercent property to set the height of the current Microsoft.Office.Tools.Excel.ChartSheetBase to 50 percent of the width of the Microsoft.Office.Tools.Excel.ChartSheetBase.

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

Applies to