Chart.DataBindCrossTable 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
資料將圖表綁定到表格,每個欄位中每個唯一值建立一個序列。
多載
| 名稱 | Description |
|---|---|
| DataBindCrossTable(IEnumerable, String, String, String, String) |
資料將圖表綁定到表格,每個欄位中每個唯一值建立一個序列。 |
| DataBindCrossTable(IEnumerable, String, String, String, String, PointSortOrder) |
資料將圖表綁定到表格,每個欄位中每個唯一值建立一個序列。 |
DataBindCrossTable(IEnumerable, String, String, String, String)
資料將圖表綁定到表格,每個欄位中每個唯一值建立一個序列。
public:
void DataBindCrossTable(System::Collections::IEnumerable ^ dataSource, System::String ^ seriesGroupByField, System::String ^ xField, System::String ^ yFields, System::String ^ otherFields);
public void DataBindCrossTable(System.Collections.IEnumerable dataSource, string seriesGroupByField, string xField, string yFields, string otherFields);
member this.DataBindCrossTable : System.Collections.IEnumerable * string * string * string * string -> unit
Public Sub DataBindCrossTable (dataSource As IEnumerable, seriesGroupByField As String, xField As String, yFields As String, otherFields As String)
參數
- dataSource
- IEnumerable
圖表所綁定的資料來源。
- seriesGroupByField
- String
欄位名稱用來將資料歸類為序列。
- xField
- String
X 值欄位的名稱。
- yFields
- String
一個逗號分隔的欄位名稱列表,對應 Y 值。
- otherFields
- String
其他資料點屬性可以被綁定。
備註
系列會自動加入圖表,取決於資料來源欄位 seriesGroupByField 中獨特值的數量;換句話說,系列的建立取決於欄位的分組。
資料來源可以是 ,OleDbDataReader也可以SqlDataReader是DataView物件。 請注意,所有實作該 IEnumerable 介面的集合都可以使用。
除了 X 和 Y 值之外,其他資料點屬性也可以被綁定。 格式為:PointProperty=Field[{Format}] [,PointProperty= Field[{Format}]]。 例如:「Tooltip=Price{C1},Href=WebSiteName」。
這些資料點屬性包括:
- DataPointCustomProperties.AxisLabel
- DataPointCustomProperties.ToolTip
- DataPointCustomProperties.Url
- DataPointCustomProperties.PostBackValue
- DataPointCustomProperties.Label
- DataPointCustomProperties.LegendText
- DataPointCustomProperties.LegendToolTip
- DataPointCustomProperties.CustomProperties,這些是自訂屬性的名稱。
適用於
DataBindCrossTable(IEnumerable, String, String, String, String, PointSortOrder)
資料將圖表綁定到表格,每個欄位中每個唯一值建立一個序列。
public:
void DataBindCrossTable(System::Collections::IEnumerable ^ dataSource, System::String ^ seriesGroupByField, System::String ^ xField, System::String ^ yFields, System::String ^ otherFields, System::Web::UI::DataVisualization::Charting::PointSortOrder sortingOrder);
public void DataBindCrossTable(System.Collections.IEnumerable dataSource, string seriesGroupByField, string xField, string yFields, string otherFields, System.Web.UI.DataVisualization.Charting.PointSortOrder sortingOrder);
member this.DataBindCrossTable : System.Collections.IEnumerable * string * string * string * string * System.Web.UI.DataVisualization.Charting.PointSortOrder -> unit
Public Sub DataBindCrossTable (dataSource As IEnumerable, seriesGroupByField As String, xField As String, yFields As String, otherFields As String, sortingOrder As PointSortOrder)
參數
- dataSource
- IEnumerable
圖表所綁定的資料來源。
- seriesGroupByField
- String
欄位名稱用來將資料歸類為序列。
- xField
- String
X 值欄位的名稱。
- yFields
- String
一個逗號分隔的欄位名稱列表,對應 Y 值。
- otherFields
- String
其他資料點屬性可以被綁定。
- sortingOrder
- PointSortOrder
系列將依群組欄位值依指定順序排序。
備註
系列會自動加入圖表,取決於資料來源欄位 seriesGroupByField 中獨特值的數量;換句話說,系列的建立取決於欄位的分組。
資料來源可以是 ,OleDbDataReader也可以SqlDataReader是DataView物件。
請注意,所有實作該 IEnumerable 介面的集合都可以使用。
除了 X 和 Y 值之外,其他資料點屬性也可以被綁定。 格式為:PointProperty=Field[{Format}] [,PointProperty= Field[{Format}]]。 例如:「Tooltip=Price{C1},Href=WebSiteName」。
這些資料點屬性的列表如下:AxisLabel、 ToolTipUrlLabelLegendTextLegendToolTipCustomProperties ,這些都是自訂屬性的名稱。