Time Series Controls


Show/Hide a Series

This page describes how to show and hide the a series. The time series controls of the Silverlight Analytics package include the following:

The series classes of the respective controls are:

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

  • Visibility

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

Hide a Series

Below, we will hide an Individual series (named isSeries in the examples below) of an Individuals control (named indControl in the examples below). The process is similar for the other charts:

[Visual Basic]
' Hide the series
isSeries.Visibility = System.Windows.Visibility.Collapsed

' An alternative method to hide the ith (0 below) series
indChart.SeriesCollection(0).Visibility = System.Windows.Visibility.Collapsed

[Visual C#]
// Hide the series
isSeries.Visibility = System.Windows.Visibility.Collapsed;

// An alternative method to hide the ith (0 below) series
indChart.SeriesCollection[0].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