Time Series Controls
Add a New Sample
This page describes how to add a sample to the sample-based time series controls. The time series controls of the Silverlight Analytics package that are based on samples include the following:
The series classes of the respective controls are:
and the sample classes are:
The first step is to include the necessary namespace
and add a new series.
Add a Sample
Below, we will add a sample to an Individuals series (named isSeries in the
examples below) and to an Individuals control (named indControl in the
examples below). The process is similar for the other chart listed above:
[Visual Basic]
' Create a new sample
Dim isSample As New IndSample(0.047)
' Add the
sample to the series
isSeries.Add(isSample)
' An alternative is to
add the sample directly to the series
isSeries.Add(0.707)
' Another alternative is to add the sample directly to the series collection
at the ith (0 below) series
indControl.SeriesCollection(0).Add(0.923)
[Visual C#]
// Create a new sample
IndSample isSample = new IndSample(0.047);
// Add the
sample to the series
isSeries.Add(isSample);
// An alternative is
to add the sample directly to the series
isSeries.Add(0.707);
// Another alternative is to add the sample directly to the series collection
at the ith (0 below) series
indControl.SeriesCollection[0].Add(0.923);
In the chart below, you can test the code to see what the result will look like: