Data Binding RadChart
Many business applications rely on database data, for example MS SQL, Oracle, MySQL, Access ODBC as well as XML data and business objects in multiple-tier scenarios. RadChart allows automatic binding to all of these using either standard Microsoft supplied data source controls SqlDataSource, AccessDataSource, XmlDataSource and ObjectDataSource or any DataSourceControl implementation. The end result is shown in the chart immediately at design-time.
You can also bind RadChart to a data source that implements one of the following interfaces:
IEnumerable: Supports simple iteration of a collection. See the MSDN article for more on IEnumerable.
ICollection: Extends IEnumerable and supports size, enumerator, and synchronization methods for collections.
IList: Extends ICollection and is the base class for lists.
IBindingList: Extends IList an supports binding to a data source.
IListSource: Provides functionality to an object to return a list that can be bound to a data source.
Some of the implementations of these interfaces include:
Array: See Data Binding RadChart to an Array for an example.
CollectionBase Objects.
DataView, DataTable, DataSet: See Data Bindng to a Database Object, Data binding RadChart to an ObjectDatasource, DataBinding to an XML file examples.
Generic List class: See Data Binding RadChart to a Generic List for an example of binding to a generic list.
You can also bind to XML data through an XMLDataSource or directly to an XML file.
Once you have the data source defined you can use the RadChart Wizard, Property Editor or code for selecting which data columns will be used to populate the chart. The key properties for binding to a data source are: DataRelatedPropertiesSeriesDataRelatedPropertiesAxisDataRelatedPropertiesChart