Version

Stacked Series

This topic explains various types of Stacked Series in the XamDataChart™ control.

Introduction

Stacked Series is a group of the simplest and most common form of chart series that take data and render it as collection of data points stretched along a horizontal line (e.g. column series) or vertical line (e.g. bar series).

Types of Stacked Series

The XamDataChart control supports the following types of Stacked Series and each of them is discussed in an individual topic:

These topics will provide you with useful information on how to use create a specific type of Stacked Series and bind data to it.

Preview of Stacked Series

This section provides preview images for all types of Stacked Series.

Series Type Description

The Stacked 100-Area Series is identical to the StackedAreaSeries in all aspects except in their treatment of the values on y-axis. Instead of presenting a direct representation of the data, the Stacked100AreaSeries presents the data in terms of percent of the sum of all values in a data point.

Same as the Stacked Bar Series type with the added feature of presenting data in terms of percent of all values in category instead of presenting a direct representation of the data.

Same as the Stacked Column Series type with the added feature of presenting data in terms of percent of all values in the same category instead of presenting a direct representation of the data.

The Stacked 100-Line Series is identical to the StackedLineSeries in all aspects except in their treatment of the values on y-axis. Instead of presenting a direct representation of the data, the Stacked100LineSeries presents the data in terms of percent of the sum of all values in a data point.

The Stacked 100-Spline Area Series is identical to the StackedSplineAreaSeries in all aspects except in their treatment of the values on y-axis. Instead of presenting a direct representation of the data, the Stacked100SplineAreaSeries presents the data in terms of percent of the sum of all values in a data point.

The Stacked100SplineSeries is identical to the StackedSplineSeries in all aspects except in their treatment of the values on y-axis. Instead of presenting a direct representation of the data, the Stacked100SplineSeries presents the data in terms of percent of the sum of all values in a data point.

Stacked Area Series is rendered using a collection of points connected by line segments (StackedFragmentSeries) with the area below the line filled in and stacked on top of each other. Each stacked fragment in the collection represents one visual element in each stack. Each stack can contain both positive and negative values. All positive values are grouped on the positive side of the y-axis, and all negative values are grouped on the negative side of the y-axis.

Displays discrete data in bars stacked next to each other. Categories are arranged vertically and values are stacked horizontally.

Used for showing the changes in a data series over time or for comparing multiple items.

Displays discrete data in columns stacked on top of each other. Categories are arranged horizontally and values are stacked vertically.

Used for showing the changes in a data series over time or for comparing multiple items.

Stacked Line Series is rendered using a collection of points connected by line segments (StackedFragmentSeries) that are stacked on top of each other. Each stacked fragment in the collection represents one visual element in each stack. Each stack can contain both positive and negative values. All positive values are grouped on the positive side of the y-axis, and all negative values are grouped on the negative side of the y-axis.

Stacked Spline Area Series is rendered using a collection of points connected by smooth curves of spline segments (StackedFragmentSeries) with the area below the spline filled in and stacked on top of each other. Each stacked fragment in the collection represents one visual element in each stack. Each stack can contain both positive and negative values. All positive values are grouped on the positive side of the y-axis, and all negative values are grouped on the negative side of the y-axis.

Stacked Spline Series is rendered using a collection of points connected by smooth curves of spline segments (StackedFragmentSeries) that are stacked on top of each other. Each stacked fragment in the collection represents one visual element in each stack. Each stack can contain both positive and negative values. All positive values are grouped on the positive side of the y-axis, and all negative values are grouped on the negative side of the y-axis.

Supported Axes

The XamDataChart control provides various types of axes but only the following types of axes can be used with specific types of Stacked Series. The following table lists these supported axes:

Series Type XAxis Type YAxis Type

StackedBarSeries

Stacked100BarSeries

StackedColumnSeries

Stacked100ColumnSeries

StackedAreaSeries

Stacked100AreaSeries

StackedLineSeries

Stacked100LineSeries

StackedSplineSeries

Stacked100SplineSeries

StackedSplineAreaSeries

Stacked100SplineAreaSeries

In addition, each of Stacked Series must have binding set to one x-axis using the property XAxis and one y-axis using YAxis property. For more information on axes, refer to the Axes topic.

Data Binding

This section provides information about binding data for all types of Stacked Series from data requirements through data sample to binding diagrams.

Data Requirements

Similarly to other types of series in the XamDataChart control, Stacked Series also use the ItemsSource property to bind data. All series can be bound to any object that implements the IEnumerable interface (e.g. List, Collection, Queue, or Stack), however, in case of Stacked Series, each item in this object must have at least one numeric data column which is mapped using the ValueMemberPath property of the series and one data column which is mapped to the Label property of the category axis (e.g. CategoryXAxis) or the DateTimeMemberPath when using TimeXAxis. For more information on the requirements for the specific types of series, refer to the Series Requirements topic.

Data Sample

An example of object that meets above criteria is the Category Data Sample which you can download from the Sample Energy Data resource and use it in your project.

Related Content