Legend.LegendStyle 屬性

定義

取得或設定圖例的樣式。

public:
 property System::Web::UI::DataVisualization::Charting::LegendStyle LegendStyle { System::Web::UI::DataVisualization::Charting::LegendStyle get(); void set(System::Web::UI::DataVisualization::Charting::LegendStyle value); };
[System.ComponentModel.Bindable(true)]
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.Attribute)]
public System.Web.UI.DataVisualization.Charting.LegendStyle LegendStyle { get; set; }
[<System.ComponentModel.Bindable(true)>]
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.Attribute)>]
member this.LegendStyle : System.Web.UI.DataVisualization.Charting.LegendStyle with get, set
Public Property LegendStyle As LegendStyle

屬性值

決定圖例樣式的 LegendStyle 列舉值。 預設值是 Table

屬性

備註

根據預設,圖例會顯示為數據表中的一系列專案。 您可以藉由設定 TableStyle 屬性,指定是否要展開表格寬度或高度的專案。 TableStyle當 屬性設定為 Auto 時, Chart 控制項會根據圖表的對齊方式和位置,決定要繪製寬型資料表或高表格。 這可能會導致使用多個圖例專案資料行繪製圖例。

圖例有三種可能樣式:資料行、資料列和資料表。 如需這些樣式的摘要,請參閱下表:

樣式 描述
資料行 圖例專案會顯示在一個資料行中,其中包含多個資料列。 最常在圖例停駐在圖表的左邊或右側時使用。
資料列 圖例專案會顯示在一個資料列中,其中包含多個資料行。 最常在圖例停駐到圖表的頂端或底部時使用。
Table 圖例專案會使用多個資料行和資料列來顯示。

適用於