Time Series Controls
Add a New Subgroup
Samples for the subgroup based control charts must be added to a subgroup.
The time series controls of the Silverlight Analytics package that are based on subgroups include the following:
In order to add samples (observations) to these charts, the samples must be
added first to a subgroup.
The series classes of the respective controls are:
The subgroup classes are:
The first step is to include the necessary namespace
for the controls and add a new series.
Add a Subgroup
Below, we will add a subgroup to a Xbar series (named xsSeries in the
examples below) and to a Xbar control (named xbarControl in the
examples below). The process is similar for the other charts listed above:
[Visual Basic]
' Create a new subgroup
Dim xsSubgroup As New XbarSubgroup()
' Add the
subgroup to the series
xsSeries.Add(xsSubgroup)
' An alternative is
to add the subgroup directly to the series
xsSeries.Add("Subgroup 2")
' Another alternative is to add the subgroup directly to the series collection
at the ith (0 below) series
xbarControl.SeriesCollection(0).Add("Subgroup 3")
[Visual C#]
// Create a new subgroup
XbarSubgroup xsSubgroup = new XbarSubgroup();
// Add the
subgroup to the series
xsSeries.Add(xsSubgroup);
// An alternative is
to add the subgroup directly to the series
xsSeries.Add("Subgroup 2");
// Another alternative is to add the subgroup directly to the series collection
at the ith (0 below) series
xbarControl.SeriesCollection[0].Add("Subgroup 3");
In the chart below, you can test the code to see what the result will look like: