편집

다음을 통해 공유


DataPointCollection.DataBindXY Method

Definition

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

Overloads

DataBindXY(IEnumerable, IEnumerable[])

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

DataBindXY(IEnumerable, String, IEnumerable, String)

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

DataBindXY(IEnumerable, IEnumerable[])

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

public:
 void DataBindXY(System::Collections::IEnumerable ^ xValue, ... cli::array <System::Collections::IEnumerable ^> ^ yValues);
public void DataBindXY (System.Collections.IEnumerable xValue, params System.Collections.IEnumerable[] yValues);
member this.DataBindXY : System.Collections.IEnumerable * System.Collections.IEnumerable[] -> unit
Public Sub DataBindXY (xValue As IEnumerable, ParamArray yValues As IEnumerable())

Parameters

xValue
IEnumerable

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

yValues
IEnumerable[]

A comma-separated list of the Y-value(s) of the DataPoint object added to the collection.

Remarks

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 other than the first column, use the DataBindXY method.

You can bind to multiple Y-values by providing a comma-separated list of IEnumerable<T> objects for the yValues parameter.

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

If you do not want to display scatter-type plots, in which both X and Y-values are used, use one of the DataBindY methods instead.

The following is a list of objects that you can use as the data source parameter:

  • DataView

  • Data readers (SQL, OleDB)

  • Arrays

  • Lists

  • All other objects that use the IEnumerable<T> interface.

Applies to

DataBindXY(IEnumerable, String, IEnumerable, String)

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

public:
 void DataBindXY(System::Collections::IEnumerable ^ xValue, System::String ^ xField, System::Collections::IEnumerable ^ yValue, System::String ^ yFields);
public void DataBindXY (System.Collections.IEnumerable xValue, string xField, System.Collections.IEnumerable yValue, string yFields);
member this.DataBindXY : System.Collections.IEnumerable * string * System.Collections.IEnumerable * string -> unit
Public Sub DataBindXY (xValue As IEnumerable, xField As String, yValue As IEnumerable, yFields As String)

Parameters

xValue
IEnumerable

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

xField
String

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

yValue
IEnumerable

A comma-separated list of the Y-value(s) of the DataPoint object added to the collection.

yFields
String

A comma-separated list of 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.

Remarks

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

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

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

If you do not want to display scatter-type plots, in which both X and Y-values are used, use one of the DataBindY methods instead.

The following is a list of objects that you can use as the data source parameter:

  • DataView

  • Data readers (SQL, OleDB)

  • Arrays

  • Lists

  • All other objects that use the IEnumerable<T> interface.

Applies to