Data binds the X-value and Y-values of the collection's data points to the specified data source's first columns.
The Y-value(s) of the DataPoint object added to the collection (one or more comma-separated values).
The Y-value(s) of the DataPoint object added to the collection (one or more comma-separated values).
Data bind X and Y values of the data points to the data source. Data source can be the Array, Collection, Ole(SQL)DataReader, DataView, DataSet, DataTable or DataRow.
Visual Basic (Declaration) | |
---|---|
Public Overloads Sub DataBindXY( _ ByVal xValue As IEnumerable, _ ByVal ParamArray yValues() As IEnumerable _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public void DataBindXY( IEnumerable xValue, params IEnumerable[] yValues ) |
Parameters
- xValue
-
The data source that will supply the X-values for the data points. The first available column will be used.
The datasource that will supply the X-values for the data points. The first available column will be used.
Enumerable objects with X values. - yValues
- The Y-value(s) of the DataPoint object added to the collection (one or more comma-separated values).
One or more enumerable objects with Y values.
Visual Basic | Copy Code |
---|---|
Imports Dundas.Charting.WebControl |
C# | Copy Code |
---|---|
using Dundas.Charting.WebControl; |
This method binds all DataPoint objects in a Series, and uses separate data sources for the X and Y-value(s).
Note that the first available column in the data source will be used if data-binding to a table. To bind to a column that is not the first use the DataBindXY (IEnumerable,string,IEnumerable,string) method.
You can bind to multiple Y-values by providing a comma-separated list of IEnumerable objects for the yValue[] parameter.
If Y-values are not provided by the data source, or the wrong number of values are provided an exception will be thrown.
The following is a list of objects that you can use as the datasource parameter:
-
DataView
-
Data readers (SQL, OleDB)
-
Arrays
-
Lists
-
All other objects that use the IEnumerable interface
If you do not want to display scatter-type plots (both X and Y-values used) then use one of the DataBindY methods instead.
Note: We highly recommend reading the Data Binding topic for help in determining how to bind your data.
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