Gets or sets the data source for the Chart object.
"The data source used to populate series data. Series ValueMember properties must be also set."
Visual Basic (Declaration) | |
---|---|
Public Property DataSource As Object |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public object DataSource {get; set;} |
Return Value
An object that represents the data source for the chart object.
A series' data points can be bound to a data source at any time using the DataSource property.
To force the binding of the chart to the data source the method Chart.Databind should be called.
The following is a list of objects that you can use as data sources:
-
DataView
-
Data readers (SQL, OleDB)
-
DataSet
-
DataTable
-
BindingSource
-
IDataSource
-
Arrays
-
Lists
-
All Enumerable objects
-
SqlCommand / OleDbCommand (DataSource data-binding ONLY)
-
SqlDataAdapter / OleDbDataAdapter (DataSource data-binding ONLY).
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