Compartir a través de


Chart.AutoScaling (Propiedad)

Ajusta el tamaño de un gráfico 3D para asimilarlo al del gráfico 2D equivalente.

Espacio de nombres:  Microsoft.Office.Tools.Excel
Ensamblado:  Microsoft.Office.Tools.Excel (en Microsoft.Office.Tools.Excel.dll)

Sintaxis

'Declaración
Property AutoScaling As Boolean
bool AutoScaling { get; set; }

Valor de propiedad

Tipo: System.Boolean
true si Microsoft Office Excel ajusta el tamaño de un gráfico 3D al del gráfico 2D equivalente; de lo contrario, false.La propiedad RightAngleAxes debe ser true.

Ejemplos

En el siguiente ejemplo de código se crea un control Chart 3D y, a continuación, se establece la propiedad AutoScaling en true para ajustar el tamaño del gráfico automáticamente.En el ejemplo se establece la propiedad RightAngleAxes en true antes de que se establezca la propiedad AutoScaling.

Private Sub SetAutoScaling()
    Me.Range("A1", "A5").Value2 = 22
    Me.Range("B1", "B5").Value2 = 55

    Dim Chart1 As Microsoft.Office.Tools.Excel.Chart = _
        Me.Controls.AddChart(Me.Range("D2", "H12"), "Chart1")

    Chart1.SetSourceData(Me.Range("A1", "B5"), Excel.XlRowCol.xlColumns)
    Chart1.ChartType = Excel.XlChartType.xl3DColumn

    Chart1.RightAngleAxes = True
    Chart1.AutoScaling = True
End Sub
private void SetAutoScaling()
{
    this.Range["A1", "A5"].Value2 = 22;
    this.Range["B1", "B5"].Value2 = 55;

    Microsoft.Office.Tools.Excel.Chart chart1 =
        this.Controls.AddChart(this.Range["D2", "H12"], 
        "chart1");

    chart1.SetSourceData(this.Range["A1", "B5"], 
        Excel.XlRowCol.xlColumns);
    chart1.ChartType = Excel.XlChartType.xl3DColumn;

    chart1.RightAngleAxes = true;
    chart1.AutoScaling = true;
}

Seguridad de .NET Framework

Vea también

Referencia

Chart Interfaz

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