Histogram Control
Show/Hide Series
This page describes how to show and hide a histogram series. Multiple series may be shown at the same time; however, the data is more visible when only one series is shown at a time. The histogram control of the .Net Analytics package is of the following type:
The series class of the histogram chart is:
and the following property is responsible for showing/hiding the series:
The first step is to include the necessary namespaces
for the controls and add new series.
Show and Hide Series
Below, we will show the second series and hide the first series (named
hsSeries in the
examples below) of a Histogram chart (named hcChart in the examples below):
[Visual Basic]
' Hide the first series
hsSeries.Show = False
' An alternative method of hiding the first series
hcChart.SeriesCollection(0).Show = False
' Show the second series
hcChart.SeriesCollection(1).Show = True
[Visual C#]
// Hide the first series
hsSeries.Show = false;
// An alternative method of hiding the first series
hcChart.SeriesCollection[0].Show = false;
// Show the second series
hcChart.SeriesCollection[1].Show = true;
Charts showing the first and then the second series: