Series.ChartArea Propiedad

Definición

Obtiene o establece el nombre del objeto ChartArea que se usa para trazar la serie de datos, si hay alguno.

public:
 property System::String ^ ChartArea { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.Bindable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Web.UI.DataVisualization.Charting.SeriesAreaNameConverter))]
public string ChartArea { get; set; }
[<System.ComponentModel.Bindable(true)>]
[<System.ComponentModel.TypeConverter(typeof(System.Web.UI.DataVisualization.Charting.SeriesAreaNameConverter))>]
member this.ChartArea : string with get, set
Public Property ChartArea As String

Valor de propiedad

String

Un valor de tipo string que representa un objeto ChartArea, que se usa para trazar la serie.

Atributos

Ejemplos

' Create a new legend and associate three series with the legend.  
Public Sub CreateSecondLegend()  
    ' Attach the first series to a chart area.  
    Chart1.Series["Series1"].ChartArea = "Chart Area 1";  

    ' Attach the second series to a chart area.  
    Chart1.Series["Series2"].ChartArea = "Chart Area 2";  

End Sub 'CreateSecondLegend  
// Create a new legend and associate three series with the legend.  
public void CreateSecondLegend()  
{  
     // Attach the first series to a chart area.  
     Chart1.Series["Series1"].ChartArea = "Chart Area 1";  

     // Attach the second series to a chart area.  
     Chart1.Series["Series2"].ChartArea = "Chart Area 2";  

}  

Comentarios

Cuando se agrega una serie en tiempo de diseño y en tiempo de ejecución, se asigna automáticamente al objeto "Default" o al primer área de gráfico disponible en si ChartArea ChartAreaCollection "Default" no existe.

Establezca esta propiedad en una cadena de longitud cero si no desea que se trace la serie.

Se aplica a