Progress® Telerik® UI for Windows Phone


The actual data visualization in RadChart for Windows Phone is done by a set of series classes. Each series has a collection of data points, that is, a data source which it displays according to the series’ type. RadChart supports several series out of the box and these are LineSeries, BarSeries, AreaSeries, SplineAreaSeries, SplineSeries and PieSeries. This article discusses the the common series characteristics as well as the concrete LineSeries class.

The base for all series is the abstract ChartSeries class. It defines the most basic feature common to all series and this is data binding. It has an ItemsSource property of type IEnumerable. The next class in the series hierarchy is the CategoricalSeries class which inherits from ChartSeries and defines a few more properties that are related to data binding. These are ValueBinding, CategoryBinding and DataPoints. When the ItemsSource is set the ValueBinding property of the series will be used to resolve the property of the data records that will be used for visualization by the data points. The CategoryBinding will be used to determine the category of each data point which will also correspond to a user defined property of the raw data records. The DataPoints property on the other hand provides means to manually populate a chart series with data if necessary.

The CategoricalSeries class also defines the PointTemplate and PointTemplateSelector properties which allow arbitrary visualization of the data points.

The chart series also have a mechanism for combining data points that reside in different series but have the same category. This mechanism is controlled via the CombineMode property. The combine mode can be None, Cluster and Stack. None means that the series will be plotted independently of each other. Cluster will display data points in the same category huddled close together. Stack on the other hand will plot the points on top of each other. The combine mode is best described by a picture (Left - Stack, Right - Cluster):


Next in the inheritance chain is the abstract class StrokedSeries which derives from CategoricalSeries and defines stroke properties. The stroke of a series object is the stroke of the line or curve that is defined by the data points. The properties are called Stroke, StrokeThickness and DashArray. The dash array allows the user to specify a dash pattern which will be applied on the series’ line or curve. Below is a screen shot of a combination of Stroke, StrokeThickness and DashArray:


Finally, the most basic of the series is the LineSeries. The LineSeries class does not add any new features but simply draws line segments between its data points. See the Introduction article for an example of how to create a chart with line series.