Partilhar via


Series.ChartArea Propriedade

Definição

Obtém ou define o nome do objeto ChartArea usado para plotar a série de dados, se houver.

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 da propriedade

String

Um valor string que representa um objeto ChartArea, que é usado para plotar a série.

Atributos

Exemplos

' 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";  

}  

Comentários

Quando uma série é adicionada no tempo de design e no tempo de executar, ela é atribuída automaticamente ao objeto "Padrão" ou à primeira área de gráfico disponível no se ChartArea ChartAreaCollection "Padrão" não existir.

De definir essa propriedade como uma cadeia de caracteres de comprimento zero se você não quiser que a série seja plotada.

Aplica-se a