DataPointCollection.DataBind Method (IEnumerable, String, String, String)

.NET Framework (current version)
 

Data binds the X-value, Y-value(s) and property values of the data points, such as Tooltip or LabelStyle, to the data source.

Namespace:   System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)

public void DataBind(
	IEnumerable dataSource,
	string xField,
	string yFields,
	string otherFields
)

Parameters

dataSource
Type: System.Collections.IEnumerable

The data source.

xField
Type: System.String

The name of the field for X-values.

yFields
Type: System.String

A comma separated names of the fields for Y-values.

otherFields
Type: System.String

Other data point properties with binding rules, in the format: PointProperty=Field[{Format}] [,PointProperty=Field[{Format}]].

For example: "Tooltip=Price{C1},Url=WebSiteName".

The data source can be the Ole(SQL)DataReader, DataView, DataSet, DataTable or DataRow.

.NET Framework
Available since 4.0
Return to top
Show: