Chart::DataBindCrossTable Method (IEnumerable, String, String, String, String)
Data binds a chart to the table, with one series created per unique value in a given column.
Assembly: System.Web.DataVisualization (in System.Web.DataVisualization.dll)
public: void DataBindCrossTable( IEnumerable^ dataSource, String^ seriesGroupByField, String^ xField, String^ yFields, String^ otherFields )
Parameters
- dataSource
- Type: System.Collections::IEnumerable
The data source.
- seriesGroupByField
- Type: System::String
The name of the field used to group data into the series.
- xField
- Type: System::String
Name of the field for X values.
- yFields
- Type: System::String
A comma-separated list of name(s) of the field(s) for Y value(s).
- otherFields
- Type: System::String
Other data point properties that can be bound.
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".
A list of these data point properties is as follows: AxisLabel(), ToolTip(), Url(), PostBackValue(), Label(), LegendText(), LegendToolTip() and CustomProperties(), which are the names of the custom properties.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.