Specify Series Data Members
- 2 minutes to read
This topic describes how to specify a data source for a manually created series, and populate series points automatically based on the data source table. This is an alternative approach to manually adding points to a series.
After you manually create a series, it is not displayed unless it has points.
To add a project data source, click the web chart’s smart tag. In the invoked tasks list, expand the Choose Data Source drop-down list and select New data source….
Next, proceed to steps 6-11 of Lesson 3 - Bind Chart Series to Data. After you have finished connecting to the data, ensure that the web chart’s ASPxDataWebControlBase.DataSource property is correctly specified.
Since each series point is defined by both an argument and its corresponding value (and some series view types require multiple values for each argument), you should specify an appropriate argument data member and value data member(s).
To quickly access these properties, click the web chart’s smart tag, and choose Series… in its tasks list.
Then, in the invoked Series Collection Editor, select a series and switch to the Properties tab.
In this tab, specify the SeriesBase.ArgumentDataMember and SeriesBase.ValueDataMembers properties. Note that if a series uses the web chart control’s data source, it is not necessary to define the ASPxDataWebControlBase.DataSource property. It should only be specified when series use separate data sources different from that of the chart control.
Now, points will be created and populated automatically, as long as there are records (rows) in the specified data columns.
Note that at design time, the chart displays mock points for series, to use PC resources more efficiently. To force the chart to load real data, click Populate in the chart’s actions list.
To learn about essential series options, refer to the following help topic: Customize a Series.