Chart.DataBindCrossTable Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Data binds a chart to the table, with one series created per unique value in a given column.
DataBindCrossTable(IEnumerable, String, String, String, String) |
Data binds a chart to the table, with one series created per unique value in a given column. |
DataBindCrossTable(IEnumerable, String, String, String, String, PointSortOrder) |
Data binds a chart to the table, with one series created per unique value in a given column. |
Data binds a chart to the table, with one series created per unique value in a given column.
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)
Parameters
- dataSource
- IEnumerable
The data source that is data bound by a chart.
- seriesGroupByField
- String
The name of the field used to group data into the series.
- xField
- String
The name of the field for X values.
- yFields
- String
A comma-separated list of name(s) of the field(s) for Y value(s).
- otherFields
- String
The other data point properties that can be bound.
Remarks
Series will be automatically added to the chart, depending on the number of unique values in the given seriesGroupByField
column of the data source; in other words, the creation of series depends upon grouping of a column.
The data source can be a OleDbDataReader, SqlDataReader or a DataView object. Note that all collections that implement the IEnumerable interface can be used.
Other data point properties besides X and Y-values can be bound. The format is: PointProperty=Field[{Format}] [,PointProperty= Field[{Format}]]. For example:"Tooltip=Price{C1},Href=WebSiteName".
These data point properties are:
- DataPointCustomProperties.AxisLabel
- DataPointCustomProperties.ToolTip
- DataPointCustomProperties.Label
- DataPointCustomProperties.LegendText
- DataPointCustomProperties.LegendToolTip
- DataPointCustomProperties.CustomProperties, which are the names of the custom properties.
Applies to
.NET Framework 4.8.1 ja muud versioonid
Toode | Versioonid |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Data binds a chart to the table, with one series created per unique value in a given column.
public:
void DataBindCrossTable(System::Collections::IEnumerable ^ dataSource, System::String ^ seriesGroupByField, System::String ^ xField, System::String ^ yFields, System::String ^ otherFields, System::Windows::Forms::DataVisualization::Charting::PointSortOrder sortingOrder);
public void DataBindCrossTable (System.Collections.IEnumerable dataSource, string seriesGroupByField, string xField, string yFields, string otherFields, System.Windows.Forms.DataVisualization.Charting.PointSortOrder sortingOrder);
member this.DataBindCrossTable : System.Collections.IEnumerable * string * string * string * string * System.Windows.Forms.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)
Parameters
- dataSource
- IEnumerable
The data source that is data bound by a chart.
- seriesGroupByField
- String
The name of the field used to group data into the series.
- xField
- String
The name of the field for X values.
- yFields
- String
A comma-separated list of name(s) of the field(s) for Y value(s).
- otherFields
- String
The other data point properties that can be bound.
- sortingOrder
- PointSortOrder
The order in which the series will be sorted by group field values.
Remarks
Series will be automatically added to the chart, depending on the number of unique values in the given seriesGroupByField
column of the data source; in other words, the creation of series depends upon grouping of a column.
The data source can be a OleDbDataReader, SqlDataReader or a DataView object.
Note that all collections that implement the IEnumerable interface can be used.
Other data point properties besides X and Y-values can be bound. The format is: PointProperty=Field[{Format}] [,PointProperty= Field[{Format}]]. For example:"Tooltip=Price{C1},Href=WebSiteName".
These data point properties are:
- DataPointCustomProperties.AxisLabel
- DataPointCustomProperties.ToolTip
- DataPointCustomProperties.Label
- DataPointCustomProperties.LegendText
- DataPointCustomProperties.LegendToolTip
- CustomProperties, which are the names of the custom properties
Applies to
.NET Framework 4.8.1 ja muud versioonid
Toode | Versioonid |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Toote „.NET“ tagasiside
.NET on avatud lähtekoodiga projekt. Tagasiside andmiseks valige link: