Dundas Chart for ASP.NET
DataBindCrossTab(IEnumerable,String,String,String,String,PointsSortOrder) Method
See Also  Send comments on this topic.
Dundas.Charting.WebControl Namespace > Chart Class > DataBindCrossTab Method : DataBindCrossTab(IEnumerable,String,String,String,String,PointsSortOrder) Method


dataSource
The data source.
Data source.
seriesGroupByField
Name of the field used to group data into series.
Name of the field used to group data into series.
xField
Name of the field for X-values.
Name of the field for X values.
yFields
Comma separated name(s) of the field(s) for Y-value(s).
Comma separated name(s) of the field(s) for Y value(s).
otherFields
Other data point properties that can be bound (see below).
Other point properties binding rule in format: PointProperty=Field[{Format}] [,PointProperty=Field[{Format}]]. For example: "Tooltip=Price{C1},Href=WebSiteName".
sortingOrder
Series will be sorted by grouped field values in the specified order.
Series will be sorted by group field values in specified order.
Data binds the chart to the table, with one series created per unique value in a given column. Series can also be sorted.
Data bind chart to the table. Series will be automatically added to the chart depending on the number of unique values in the seriesGroupByField column of the data source. Data source can be the Ole(SQL)DataReader, DataView, DataSet, DataTable or DataRow.

Syntax

Visual Basic (Declaration)  
Public Overloads Sub DataBindCrossTab( _
   ByVal dataSource As IEnumerable, _
   ByVal seriesGroupByField As String, _
   ByVal xField As String, _
   ByVal yFields As String, _
   ByVal otherFields As String, _
   ByVal sortingOrder As PointsSortOrder _
) 
Visual Basic (Usage) Copy Code
Dim instance As Chart
Dim dataSource As IEnumerable
Dim seriesGroupByField As String
Dim xField As String
Dim yFields As String
Dim otherFields As String
Dim sortingOrder As PointsSortOrder
 
instance.DataBindCrossTab(dataSource, seriesGroupByField, xField, yFields, otherFields, sortingOrder)
C#  
public void DataBindCrossTab( 
   IEnumerable dataSource,
   string seriesGroupByField,
   string xField,
   string yFields,
   string otherFields,
   PointsSortOrder sortingOrder
)

Parameters

dataSource
The data source.
Data source.
seriesGroupByField
Name of the field used to group data into series.
Name of the field used to group data into series.
xField
Name of the field for X-values.
Name of the field for X values.
yFields
Comma separated name(s) of the field(s) for Y-value(s).
Comma separated name(s) of the field(s) for Y value(s).
otherFields
Other data point properties that can be bound (see below).
Other point properties binding rule in format: PointProperty=Field[{Format}] [,PointProperty=Field[{Format}]]. For example: "Tooltip=Price{C1},Href=WebSiteName".
sortingOrder
Series will be sorted by grouped field values in the specified order.
Series will be sorted by group field values in specified order.

Remarks

Series will be automatically added to the chart, depending on the number of unique values in the given seriesGroupByField column of the datasource (i.e. creation of series depends upon grouping of a column).

The datasource can be an Ole(SQL)DataReader or 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 properties are as follows: AxisLabelTooltipHrefLabelLegendTextLegendTooltip and CustomAttributeName (the name of a custom attribute).

Also, the resulting series are sorted using the specified sort order.

Note: We highly recommend reading the Data Binding topic for help in determining how to bind your data.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

Copyright © 2001 - 2009 Dundas Data Visualization, Inc. and others.