Time Series Controls


Show/Hide a Subgroup

A subgroup can be hidden from the drawing of a series. However, the series and limit range calculations of the control charts (limits, rules, statistics) are still calculated for the subgroup. Exclude the subgroup to not include it in the calculations. The time series controls of the Silverlight Analytics package that are based on subgroups include the following:

The series classes of the respective controls are:

and the subgroup classes are:

The following property at the subgroup level is used for showing/hiding the subgroup:

  • Visibility

The first step is to include the necessary namespace, add a new chart/control, add a new series and add new subgroups.

Hide a Subgroup

Below, we will hide a Xbar subgroup (named xsSubgroup in the examples below) of a Xbar series (named xsSeries in the examples below). The process is similar for the other charts listed above:

[Visual Basic]
' Hide the subgroup
xsSubgroup.Visibility = System.Windows.Visibility.Collapsed

' Another alternative is to hide the ith (2 below) subgroup directly from the series
xsSeries(2).Visibility = System.Windows.Visibility.Collapsed

[Visual C#]
// Hide the subgroup
xsSubgroup.Visibility = System.Windows.Visibility.Collapsed;

// Another alternative is to hide the ith (2 below) subgroup directly from the series
xsSeries[2].Visibility = System.Windows.Visibility.Collapsed;

In the chart below, you can test the code to see what the result will look like:

Get Microsoft Silverlight