Chart.DataBindCrossTable Method

Definition

Data binds a chart to the table, with one series created per unique value in a given column.

Overloads

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.

DataBindCrossTable(IEnumerable, String, String, String, String)

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, string seriesGroupByField, string xField, string yFields, string otherFields);

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:

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

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.

public void DataBindCrossTable (System.Collections.IEnumerable dataSource, string seriesGroupByField, string xField, string yFields, string otherFields, System.Windows.Forms.DataVisualization.Charting.PointSortOrder sortingOrder);

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:

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