Define a Template for Automatic Series

  • 2 minutes to read

This document describes automatic series creation based on a template. For alternative approaches, refer to Create a Series Manually and Bind a Series to a Data Source.

The automatic series creation is used when the number of series is either unknown or too large.

Note that in the Diagram.Series collection, the auto-created series precede the manually created series.

To connect the ChartControl to a database, assign a data source to the ChartControl.DataSource property.

Next, define the name of the data column where new series will be created (and named) via the Diagram.SeriesDataMember property.

For the Diagram.SeriesTemplate property, choose the common view type for the auto-created series, as shown in the image below.

DXChartsGettingStarted3_05

Next, assign the required data fields to the Series.ArgumentDataMember and Series.ValueDataMember properties. These properties determine the names of data fields from which auto-created series should obtain data for their point's arguments and values.

Note that you do not need to specify the Series.ArgumentScaleType property (set to the Auto mode by default) because the type of series points' arguments is detected automatically based on the type of underlying data.

For details on this, refer to Series Scale Types.

NOTE

You cannot obtain and customize an individual auto-created series at design time. You can define the view type or other settings for an auto-created series individually in the ChartControl.BoundDataChanged event handler.

To learn more on how to define a template for automatic series, see Lesson 4 - Use a Series Template for Auto-Created Series.

See Also