Overview
The dynamic number of series is a feature that allows you to data bind the chart to a collection of business objects holding information about the series and their data points. This feature is similar to the ItemsSource usage in the item controls in the framework (like ListBox, ComboBox, etc.).
The feature is enabled with the ChartSeriesProvider
class which is assigned to the SeriesProvider
property of RadCartesianChart
and RadPolarChart
. The provider allows you to provide a collection of series models using its Source
property. The chart series are described using the ChartSeriesDescriptor
class and its concrete implementations.
Multiple chart series generated with the series provider
See examples on the ChartSeriesProvider usage in the Using SeriesProvider article.
Series Descriptors
The series descriptors are a mediator between the series view models and the chart series visuals (like LineSeries
, AreaSeries
, etc.). The series provider introduces the following descriptors:
-
CategoricalSeriesDescriptor
—Represents a series descriptor used to create the categorical chart series variations. -
ScatterSeriesDescriptor
—Represents a series descriptor used to create the scatter chart series variations. -
OhlcSeriesDescriptor
—Represents a series descriptor used to create the financial chart series variations.
Each descriptor share the following set of properties:
-
TypePath
—Sets a string value representing the name of a property that points to the series type that needs to be created. The property that holds the type value can contain an object of typeSystem.Type
with the corresponding series type or it can contain a string value that can be converted using theTypeConverter
property of the descriptor. -
Style
—Sets theStyle
that describes the appearance of the series. If noTypePath
is specified, theTargetType
property of theStyle
object is used to generate the desired series. -
ItemsSourcePath
—Sets a string value that represents the name of the items source property that will feed the generated series. -
CollectionIndex
—Sets the index within the source collection of data (view models) for which the current descriptor should be used. This property is useful when, for example, aBarSeries
needs to be generated for the first data entry andLineSeries
for the rest of the entries.
The CategoricalSeriesDescriptor
provides the following set of properties:
-
CategoryPath
—Sets the name of the property that points to theCategory
value of the data point view model. -
ValuePath
—Sets the name of the property that points to theValue
value of the data point view model.
The default type of series that will be created with the categorical descriptor is BarSeries
.
The ScatterSeriesDescriptor
provides the following set of properties:
-
XValuePath
—ets the name of the property that points to theXValue
value of the data point view model. -
YValuePath
—ets the name of the property that points to theYValue
value of the data point view model.
The default type of series that will be created with the scatter descriptor is ScatterPointSeries
.
The OhlcSeriesDescriptor
provides the following set of properties:
-
CategoryPath
—Sets the name of the property that points to theCategory
value of the data point view model. -
OpenPath
—Sets the name of the property that points to theOpen
value of the data point view model. -
HighPath
—Sets the name of the property that points to theHigh
value of the data point view model. -
LowPath
—Sets the name of the property that points to theLow
value of the data point view model. -
ClosePath
—Sets the name of the property that points to theClose
value of the data point view model.
The default type of series that will be created with the OHLC descriptor is CandleStickSeries
.