Condividi tramite


Proprietà ChartSheet.ChartType

Ottiene o imposta il tipo Microsoft.Office.Tools.Excel.ChartSheet.

Spazio dei nomi:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

Sintassi

'Dichiarazione
Property ChartType As XlChartType
    Get
    Set
XlChartType ChartType { get; set; }

Valore proprietà

Tipo: Microsoft.Office.Interop.Excel.XlChartType
Uno dei valori di XlChartType.

Note

Alcuni tipi di grafico non sono disponibili per i rapporti di grafico pivot.

Esempi

Nell'esempio di codice riportato di seguito viene utilizzata la proprietà ChartType per impostare il tipo dell'oggetto Microsoft.Office.Tools.Excel.ChartSheet corrente su un grafico a barre 3D raggruppato.

Private Sub AdjustChartSheet()
    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
End Sub
private void AdjustChartSheet()
{
    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;
}

Sicurezza di .NET Framework

Vedere anche

Riferimenti

ChartSheet Interfaccia

Spazio dei nomi Microsoft.Office.Tools.Excel