Compartir a través de


ChartSheet.ChartType (Propiedad)

Obtiene o establece el tipo Microsoft.Office.Tools.Excel.ChartSheet.

Espacio de nombres:  Microsoft.Office.Tools.Excel
Ensamblados:   Microsoft.Office.Tools.Excel.v4.0.Utilities (en Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)
  Microsoft.Office.Tools.Excel (en Microsoft.Office.Tools.Excel.dll)

Sintaxis

'Declaración
Property ChartType As XlChartType
XlChartType ChartType { get; set; }

Valor de propiedad

Tipo: Microsoft.Office.Interop.Excel.XlChartType
Uno de los valores de XlChartType.

Comentarios

Algunos tipos de gráfico no están disponibles para los informes de gráfico dinámico.

Ejemplos

El ejemplo de código siguiente utiliza la propiedad ChartType para establecer el tipo del objeto Microsoft.Office.Tools.Excel.ChartSheet actual en un gráfico barras 3D agrupadas.

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

Seguridad de .NET Framework

Vea también

Referencia

ChartSheet Interfaz

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