Time Series Controls


Import Data from Other Charts

Samples and series can be imported from other chart types. This is supported through their constructors. 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, add a new series, and add new samples.

Import from a Histogram and Xbar Sample

Importing data should generally be done at the same level: sample-to-sample, subgroup-to-subgroup, and series-to-series. Below, we will import data to an Individuals sample from a Histogram and Xbar sample (named hsSample and xsSample respectively in the examples below). The process is similar for the other chart listed above:

[Visual Basic]
' Import data from Histogram sample
Dim isSample As New IndSample(hsSample)

' Import data from Xbar sample
isSample = New IndSample(xsSample)

[Visual C#]
// Import data from Histogram sample
IndSample isSample = new IndSample(hsSample);

// Import data from Xbar sample
isSample = new IndSample(xsSample);

Import from a Histogram Series

Below, we will import data to an Individuals chart (named indControl in the examples below) from a Histogram series (named hsSeries in the examples below). The process is similar for the other charts listed above:

[Visual Basic]
' Import data from Histogram series
indControl.SeriesCollection.Add(new IndSeries(hsSeries))

[Visual C#]
// Import data from Histogram series
indControl.SeriesCollection.Add(new IndSeries(hsSeries));

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

Get Microsoft Silverlight