Cumulative Sum Control


Add a New Sample to a 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:

and the sample class is:

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

Add a Sample to a Subgroup

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

[Visual Basic]
' Create a new sample
Dim cssSample As New CuSumSample(0.091)
' Add the sample to the subgroup
cssSubgroup.Add(cssSample)

' An alternative is to add the sample directly to the subgroup
cssSubgroup.Add(New CuSumSample(0.877))

' Another alternative is to add the sample directly to the series at the ith (0 below) subgroup
cssSeries(0).Add(New CuSumSample(0.775))

[Visual C#]
// Create a new sample
CuSumSample cssSample = new CuSumSample(0.091);
// Add the sample to the subgroup
cssSubgroup.Add(cssSample);

// An alternative is to add the sample directly to the subgroup
cssSubgroup.Add(new CuSumSample(0.877));

// Another alternative is to add the sample directly to the series at the ith (0 below) subgroup
cssSeries[0].Add(new CuSumSample(0.775));