Sdílet prostřednictvím


Series.ChartArea Vlastnost

Definice

Získá nebo nastaví název objektu ChartArea použitého k vykreslení datové řady, pokud je k nějaké.

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

Hodnota vlastnosti

String

Hodnota, string která představuje ChartArea objekt, který se používá k vykreslení řady.

Atributy

Příklady

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

}  

Poznámky

Když se řada přidá v době návrhu i za běhu, automaticky se přiřadí k objektu "Default" nebo k první dostupné oblasti grafu v případě, že ChartArea ChartAreaCollection výchozí neexistuje.

Pokud nechcete, aby se řady vykreslovali, nastavte tuto vlastnost na řetězec nulové délky.

Platí pro