Series.ChartArea 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定用於繪製資料數列 (如果有的話) 之 ChartArea 物件的名稱。
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
屬性值
string
值,表示用於繪製數列的 ChartArea 物件。
- 屬性
範例
' 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";
}
備註
在設計階段和執行時間加入數列時,會自動將它指派給「預設」物件,或如果「預設」不存在,則會自動指派給 ChartArea 第一個可用的圖表區域 ChartAreaCollection 。
如果您不想要繪製數列,請將這個屬性設定為零長度的字串。