ChartSheet.Perspective 屬性

取得或設定立體 Microsoft.Office.Tools.Excel.ChartSheet 的遠近景深。

命名空間:  Microsoft.Office.Tools.Excel
組件:  Microsoft.Office.Tools.Excel (在 Microsoft.Office.Tools.Excel.dll 中)

語法

'宣告
Property Perspective As Integer
    Get
    Set
int Perspective { get; set; }

屬性值

型別:System.Int32
立體圖表檢視的遠近景深。這個值必須介於 0 與 100 之間。

備註

如果 RightAngleAxes 屬性為 true,則會忽略這個屬性。

範例

下列程式碼範例會使用 Perspective 屬性,將目前 Microsoft.Office.Tools.Excel.ChartSheet 的檢視遠近景深設定為 45 度。 這個範例會先將 RightAngleAxes 屬性設定為 false,再設定 Perspective 屬性。

Private Sub AdjustPerspective()
    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.RightAngleAxes = False
    Me.Perspective = 45
End Sub
private void AdjustPerspective()
{
    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.RightAngleAxes = false;
    this.Perspective = 45;
}

.NET Framework 安全性

請參閱

參考

ChartSheet 介面

Microsoft.Office.Tools.Excel 命名空間