DevExpress MVC Chart allows its series to be bound to data in two ways:
- All Series objects are manually added to the Series collection, and each series is independently bound to appropriate data members from a chart's datasource.
- All Series objects are generated dynamically from a chart's data source based on template settings specified via the SeriesTemplate property.
This demo illustrates how to use the second approach, when all series are auto-generated from a datasource according to a specified series template.
In this demo, you can use the Series Data Member drop-down list to select a data field whose values are used to generate and populate series. If the "Year" field is selected, the chart shows GDP per Country for each Year. Otherwise, if "Country" is selected, the chart shows GDP per Year for each Country.