Cumulative Sum Control


Add a New Series

This page describes how to add a cumulative sum series. The cumulative sum control of the .Net Analytics package is of the following type:

The series class of the cumulative sum chart is:

The first step is to include the necessary namespaces for the controls.

Add a Single Series

Below, we will add a new series to a Cumulative Sum chart (named cscChart in the examples below):

[Visual Basic]
' Create a new series
Dim cssSeries As New CuSumSeries("Series 1")
' Add the series to the collection
cscChart.SeriesCollection.Add(cssSeries)

' An alternative is to add the series directly to the collection
cscChart.SeriesCollection.Add("Series 1")

[Visual C#]
// Create a new series
CuSumSeries cssSeries = new CuSumSeries("Series 1");
// Add the series to the collection
cscChart.SeriesCollection.Add(cssSeries);

// An alternative is to add the series directly to the collection
cscChart.SeriesCollection.Add("Series 1");

After the series has been added, subgroups and samples may then be added. Adding subgroups is discussed here. The first series of the chart can be referenced via cscChart.SeriesCollection[0]. The resulting chart should look similar to the following:

Cumulative Sum chart with one series