Export (0) Print
Expand All

Chart.DataSource Property

Gets or sets the data source for the Chart object.

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

[PersistenceModeAttribute(PersistenceMode.Attribute)]
[BindableAttribute(true)]
public override Object DataSource { get; set; }
<asp:Chart DataSource="Object" />

Property Value

Type: System.Object
An Object that represents the data source for the Chart object.

The data points in a series can be bound to a data source at any time using the DataSource property.

To force the chart to bind to the data source, call the DataBind() method.

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

  • DataView

  • Data readers (SQL, OleDB)

  • DataSet

  • DataTable

  • Binding Source

  • IDataSource

  • Arrays

  • Lists

  • All Enumerable objects

  • SqlCommand / OleDbCommand (DataSource data-binding only)

  • SqlDataAdapter / OleDbDataAdapter (DataSource data-binding only)

.NET Framework

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft