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


xValue

The data source that will supply the X-values for the data points.


Enumerable object with X values.
xField

The name of the column that will supply the X-values for the data points.


Name of the field for X values.
yValue
The Y-value(s) of the DataPoint object added to the collection (one or more comma-separated values).
Enumerable objects with Y values.
yFields

Comma-separated column name(s) that will supply the Y-values for the data points. Note that a comma can be embedded as part of a column name by using a double comma.


Comma separated name(s) of the field(s) for Y value(s).

Data binds the X-value and Y-values of the collection's data points to the specified columns of the specified data sources.


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.

Syntax

Visual Basic (Declaration)  
Public Overloads Sub DataBindXY( _
   ByVal xValue As IEnumerable, _
   ByVal xField As String, _
   ByVal yValue As IEnumerable, _
   ByVal yFields As String _
) 
Visual Basic (Usage) Copy Code
Dim instance As DataPointCollection
Dim xValue As IEnumerable
Dim xField As String
Dim yValue As IEnumerable
Dim yFields As String
 
instance.DataBindXY(xValue, xField, yValue, yFields)
C#  
public void DataBindXY( 
   IEnumerable xValue,
   string xField,
   IEnumerable yValue,
   string yFields
)

Parameters

xValue

The data source that will supply the X-values for the data points.


Enumerable object with X values.
xField

The name of the column that will supply the X-values for the data points.


Name of the field for X values.
yValue
The Y-value(s) of the DataPoint object added to the collection (one or more comma-separated values).
Enumerable objects with Y values.
yFields

Comma-separated column name(s) that will supply the Y-values for the data points. Note that a comma can be embedded as part of a column name by using a double comma.


Comma separated name(s) of the field(s) for Y value(s).

Remarks

Data binds the X-value and Y-values of the collection's data points to the specified data source's first columns.

You can bind to several Y-values by setting the yFields argument to multiple column names. Separate the column names with commas.

If Y-values are not provided by the datasource, or the wrong number of values are provided an exception will be thrown.

If you do not want to display scatter-type plots (both X and Y-values used) then use one of the DataBindY methods instead.

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. 

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

IMPORTANT: With the Professional version of the chart there will not be data points for any missing records (i.e. a missing record is just skipped). However, with the Enterprise version of the chart missing records will have corresponding data points that have a value of DBNULL.

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.