Cumulative Sum Control


Add a New Subgroup

Samples for the cumulative sum control must be added to a subgroup. The cumulative sum control of the .Net Analytics package is of the following type:

The series class of the cumulative sum chart is:

The subgroup class of a cumulative sum series is:

The first step is to include the necessary namespaces for the controls and add a new series.

Add a Subgroup

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

[Visual Basic]
' Create a new subgroup
Dim cssSubgroup As New CuSumSubgroup()
' Add the subgroup to the series
cssSeries.Add(cssSubgroup)

' An alternative is to add the subgroup directly to the series
cssSeries.Add("Subgroup 2")

' Another alternative is to add the subgroup directly to the series collection at the ith (0 below) series
cscChart.SeriesCollection(0).Add("Subgroup 3")

[Visual C#]
// Create a new subgroup
CuSumSubgroup cssSubgroup = new CuSumSubgroup();
// Add the subgroup to the series
cssSeries.Add(cssSubgroup);

// An alternative is to add the subgroup directly to the series
cssSeries.Add("Subgroup 2");

// Another alternative is to add the subgroup directly to the series collection at the ith (0 below) series
cscChart.SeriesCollection[0].Add("Subgroup 3");

After the subgroups have been added, and samples have been added to the subgroups as described here, the resulting chart should look similar to the following:

Cumulative Sum chart with three subgroups