Stacked Series

A StackedSeries is a collection of values to be displayed on a graph. When multiple Stacked Series are added to the same PlotArea, values for a particular index (on any indexed stacked series) or a particular point in time (on any date-time stacked series) will literally be stacked on top of each other. There are four different groups of Stacked Series corresponding to the four different types of stacked charts (stacked area, stacked bar, stacked column and stacked line). Each stacked series group will have both an indexed and a date-time type.

Stacked Pie and Scatter charts do not exist.

Stacked Area Series

An area chart has two types of stacked series, DateTimeStackedAreaSeries and IndexedStackedAreaSeries.

DateTimeStackedAreaSeries

A DateTimeStackedAreaSeries is a collection of DateTimeStackedAreaSeriesElement each corresponding to a particular point in time that will be plotted as a stacked area chart. A DateTimeStackedAreaSeries uses DateTimeXAxis as the XAxis type and NumericYAxis as the YAxis type. It uses the .NET Framework's DateTime structure for setting the date portion of the values in the series.

The following code shows how to create and add elements to a DateTimeStackedAreaSeries.

DateTimeStackedAreaSeries stackedAreaSeries = new DateTimeStackedAreaSeries();
DateTimeStackedAreaSeriesElement areaSeriesElement1 = new DateTimeStackedAreaSeriesElement("Website A");
areaSeriesElement1.Values.Add(51, new DateTime(2004, 1, 1));
areaSeriesElement1.Values.Add(99, new DateTime(2004, 1, 2));
areaSeriesElement1.Values.Add(42, new DateTime(2004, 1, 3));
DateTimeStackedAreaSeriesElement areaSeriesElement2 = new DateTimeStackedAreaSeriesElement("Website B");
areaSeriesElement2.Values.Add(11, new DateTime(2004, 1, 1));
areaSeriesElement2.Values.Add(30, new DateTime(2004, 1, 2));
areaSeriesElement2.Values.Add(22, new DateTime(2004, 1, 3));
stackedAreaSeries.Add(areaSeriesElement1);
stackedAreaSeries.Add(areaSeriesElement2);        
Dim MyStackedAreaSeries As DateTimeStackedAreaSeries = New DateTimeStackedAreaSeries()
Dim MyAreaSeriesElement1 As DateTimeStackedAreaSeriesElement = New DateTimeStackedAreaSeriesElement("Website A")
MyAreaSeriesElement1.Values.Add(51, New Date(2004, 1, 1))
MyAreaSeriesElement1.Values.Add(99, New Date(2004, 1, 2))
MyAreaSeriesElement1.Values.Add(42, New Date(2004, 1, 3))
Dim MyAreaSeriesElement2 As DateTimeStackedAreaSeriesElement = New DateTimeStackedAreaSeriesElement("Website B")
MyAreaSeriesElement2.Values.Add(11, New Date(2004, 1, 1))
MyAreaSeriesElement2.Values.Add(30, New Date(2004, 1, 2))
MyAreaSeriesElement2.Values.Add(22, New Date(2004, 1, 3))
MyStackedAreaSeries.Add(MyAreaSeriesElement1)
MyStackedAreaSeries.Add(MyAreaSeriesElement2)      

IndexedStackedAreaSeries

An IndexedStackedAreaSeries is a collection of IndexedStackedAreaSeriesElement that will be plotted as a StackedAreaSeries in indexed order. An IndexedStackedAreaSeries uses an IndexedXAxis as the XAxis type and a NumericYAxis as the YAxis type.

The following code shows how to create and add elements to an IndexedStackedAreaSeries.

IndexedStackedAreaSeries areaSeries = new IndexedStackedAreaSeries();
IndexedStackedAreaSeriesElement seriesElement1 = new IndexedStackedAreaSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedStackedAreaSeriesElement seriesElement2 = new IndexedStackedAreaSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
areaSeries.Add(seriesElement1);
areaSeries.Add(seriesElement2);        
Dim MyAreaSeries As IndexedStackedAreaSeries = New IndexedStackedAreaSeries()
Dim MySeriesElement1 As IndexedStackedAreaSeriesElement = New IndexedStackedAreaSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As IndexedStackedAreaSeriesElement = New IndexedStackedAreaSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {4, 2, 5, 8})
MyAreaSeries.Add(MySeriesElement1)
MyAreaSeries.Add(MySeriesElement2) 

Stacked Bar Series

A bar chart has two types of stacked series, DateTimeStackedBarSeries and IndexedStackBarSeries.

DateTimeStackedBarSeries

A DateTimeStackedBarSeries is a collection of DateTimeStackedBarSeriesElement each corresponding to a particular point in time that will be plotted as a Stacked Bar chart. A DateTimeStackedBarSeries uses DateTimeXAxis as the XAxis type and NumericYAxis as the YAxis type. It uses the .NET Framework's DateTime structure for setting the date portion of the values in the series.

The following code shows how to create and add elements to a DateTimeStackedBarSeries.

DateTimeStackedBarSeries stackedBarSeries = new DateTimeStackedBarSeries();
DateTimeStackedBarSeriesElement barSeriesElement1 = new DateTimeStackedBarSeriesElement("Website A");
barSeriesElement1.Values.Add(51, new DateTime(2004, 1, 1));
barSeriesElement1.Values.Add(99, new DateTime(2004, 1, 2));
barSeriesElement1.Values.Add(42, new DateTime(2004, 1, 3));
DateTimeStackedBarSeriesElement barSeriesElement2 = new DateTimeStackedBarSeriesElement("Website B");
barSeriesElement2.Values.Add(11, new DateTime(2004, 1, 1));
barSeriesElement2.Values.Add(30, new DateTime(2004, 1, 2));
barSeriesElement2.Values.Add(22, new DateTime(2004, 1, 3));
stackedBarSeries.Add(barSeriesElement1);
stackedBarSeries.Add(barSeriesElement2);        
Dim MyStackedBarSeries As DateTimeStackedBarSeries = New DateTimeStackedBarSeries()
Dim MyBarSeriesElement1 As DateTimeStackedBarSeriesElement = New DateTimeStackedBarSeriesElement("Website A")
MyBarSeriesElement1.Values.Add(51, New Date(2004, 1, 1))
MyBarSeriesElement1.Values.Add(99, New Date(2004, 1, 2))
MyBarSeriesElement1.Values.Add(42, New Date(2004, 1, 3))
Dim MyBarSeriesElement2 As DateTimeStackedBarSeriesElement = New DateTimeStackedBarSeriesElement("Website B")
MyBarSeriesElement2.Values.Add(11, New Date(2004, 1, 1))
MyBarSeriesElement2.Values.Add(30, New Date(2004, 1, 2))
MyBarSeriesElement2.Values.Add(22, New Date(2004, 1, 3))
MyStackedBarSeries.Add(MyBarSeriesElement1)
MyStackedBarSeries.Add(MyBarSeriesElement2)      

IndexedStackedBarSeries

An IndexedStackedBarSeries is a collection of IndexedStackedBarSeriesElement that is plotted as a StackedBarSeries in indexed order. An IndexedStackedBarSeries uses an IndexedXAxis as the XAxis type and a NumericYAxis as the YAxis type.

The following code shows how to create and add elements to an IndexedStackedBarSeries.

IndexedStackedBarSeries barSeries = new IndexedStackedBarSeries();
IndexedStackedBarSeriesElement seriesElement1 = new IndexedStackedBarSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedStackedBarSeriesElement seriesElement2 = new IndexedStackedBarSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
barSeries.Add(seriesElement1);
barSeries.Add(seriesElement2);        
Dim MyBarSeries As IndexedStackedBarSeries = New IndexedStackedBarSeries()
Dim MySeriesElement1 As IndexedStackedBarSeriesElement = New IndexedStackedBarSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As IndexedStackedBarSeriesElement = New IndexedStackedBarSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {5, 7, 9, 6})
MyBarSeries.Add(MySeriesElement1)
MyBarSeries.Add(MySeriesElement2)   

Stacked Column Series

A column chart has two types of stacked series, DateTimeStackedColumnSeries and IndexStackedColumnSeries.

DateTimeStackedColumnSeries

A DateTimeStackedColumnSeries is a collection of DateTimeStackedColumnSeriesElement each corresponding to a particular point in time that will be plotted as a stacked column chart. A DateTimeStackedColumnSeries uses DateTimeXAxis as the XAxis tyspe and NumericYAxis as the YAxis type. It uses the .NET Framework's DateTime structure for setting the date portion of the values in the series.

The following code shows how to create and add elements to a DateTimeStackedColumnSeries.

DateTimeStackedColumnSeries stackedColumnSeries = new DateTimeStackedColumnSeries();
DateTimeStackedColumnSeriesElement columnSeriesElement1 = new DateTimeStackedColumnSeriesElement("Website A");
columnSeriesElement1.Values.Add(51, new DateTime(2004, 1, 1));
columnSeriesElement1.Values.Add(99, new DateTime(2004, 1, 2));
columnSeriesElement1.Values.Add(42, new DateTime(2004, 1, 3));
DateTimeStackedColumnSeriesElement columnSeriesElement2 = new DateTimeStackedColumnSeriesElement("Website B");
columnSeriesElement2.Values.Add(11, new DateTime(2004, 1, 1));
columnSeriesElement2.Values.Add(30, new DateTime(2004, 1, 2));
columnSeriesElement2.Values.Add(22, new DateTime(2004, 1, 3));
stackedColumnSeries.Add(columnSeriesElement1);
stackedColumnSeries.Add(columnSeriesElement2);        
Dim MyStackedColumnSeries As DateTimeStackedColumnSeries = New DateTimeStackedColumnSeries()
Dim MyColumnSeriesElement1 As DateTimeStackedColumnSeriesElement = New DateTimeStackedColumnSeriesElement("Website A")
MyColumnSeriesElement1.Values.Add(51, New Date(2004, 1, 1))
MyColumnSeriesElement1.Values.Add(99, New Date(2004, 1, 2))
MyColumnSeriesElement1.Values.Add(42, New Date(2004, 1, 3))
Dim MyColumnSeriesElement2 As DateTimeStackedColumnSeriesElement = New DateTimeStackedColumnSeriesElement("Website B")
MyColumnSeriesElement2.Values.Add(11, New Date(2004, 1, 1))
MyColumnSeriesElement2.Values.Add(30, New Date(2004, 1, 2))
MyColumnSeriesElement2.Values.Add(22, New Date(2004, 1, 3))
MyStackedColumnSeries.Add(MyColumnSeriesElement1)
MyStackedColumnSeries.Add(MyColumnSeriesElement2)      

IndexedStackedColumnSeries

An IndexedStackedColumnSeries is a collection of IndexedStackedColumnSeriesElement that will be plotted as a StackedColumnSeries in indexed order. An IndexedStackedColumnSeries uses an IndexedXAxis as the XAxis type and a NumericYAxis as the YAxis type.

The following code shows how to create and add elements to an IndexedStackedColumnSeries.

IndexedStackedColumnSeries columnSeries = new IndexedStackedColumnSeries();
IndexedStackedColumnSeriesElement seriesElement1 = new IndexedStackedColumnSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedStackedColumnSeriesElement seriesElement2 = new IndexedStackedColumnSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
columnSeries.Add(seriesElement1);
columnSeries.Add(seriesElement2);        
Dim MyColumnSeries As IndexedStackedColumnSeries = New IndexedStackedColumnSeries()
Dim MySeriesElement1 As IndexedStackedColumnSeriesElement = New IndexedStackedColumnSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As IndexedStackedColumnSeriesElement = New IndexedStackedColumnSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {5, 7, 9, 6})
MyColumnSeries.Add(MySeriesElement1)
MyColumnSeries.Add(MySeriesElement2)      

Stacked Line Series

A line chart has two types of stacked series, DateTimeStackedLineSeries and IndexedStackedLineSeries.

DateTimeStackedLineSeries

A DateTimeStackedLineSeries is a collection of DateTimeStackedLineSeriesElement each corresponding to a particular point in time that will be plotted as a stacked line chart. A DateTimeStackedLineSeries uses DateTimeXAxis as XAxis type and NumericYAxis as the YAxis type. It uses the .NET Framework's DateTime structure for setting the date portion of the values in the series.

The following code shows how to create and add elements to a DateTimeStackedLineSeries.

DateTimeStackedLineSeries stackedLineSeries = new DateTimeStackedLineSeries();
DateTimeStackedLineSeriesElement lineSeriesElement1 = new DateTimeStackedLineSeriesElement("Website A");
lineSeriesElement1.Values.Add(51, new DateTime(2004, 1, 1));
lineSeriesElement1.Values.Add(99, new DateTime(2004, 1, 2));
lineSeriesElement1.Values.Add(42, new DateTime(2004, 1, 3));
DateTimeStackedLineSeriesElement lineSeriesElement2 = new DateTimeStackedLineSeriesElement("Website B");
lineSeriesElement2.Values.Add(11, new DateTime(2004, 1, 1));
lineSeriesElement2.Values.Add(30, new DateTime(2004, 1, 2));
lineSeriesElement2.Values.Add(22, new DateTime(2004, 1, 3));
stackedLineSeries.Add(lineSeriesElement1);
stackedLineSeries.Add(lineSeriesElement2);        
Dim MyStackedLineSeries As DateTimeStackedLineSeries = New DateTimeStackedLineSeries()
Dim MyLineSeriesElement1 As DateTimeStackedLineSeriesElement = New DateTimeStackedLineSeriesElement("Website A")
MyLineSeriesElement1.Values.Add(51, New Date(2004, 1, 1))
MyLineSeriesElement1.Values.Add(99, New Date(2004, 1, 2))
MyLineSeriesElement1.Values.Add(42, New Date(2004, 1, 3))
Dim MyLineSeriesElement2 As DateTimeStackedLineSeriesElement = New DateTimeStackedLineSeriesElement("Website B")
MyLineSeriesElement2.Values.Add(11, New Date(2004, 1, 1))
MyLineSeriesElement2.Values.Add(30, New Date(2004, 1, 2))
MyLineSeriesElement2.Values.Add(22, New Date(2004, 1, 3))
MyStackedLineSeries.Add(MyLineSeriesElement1)
MyStackedLineSeries.Add(MyLineSeriesElement2)      

IndexedStackedLineSeries

An IndexedStackedLineSeries is a collection of IndexedStackedLineSeriesElement that will be plotted as a StackedLineSeries in indexed order. An IndexedStackedLineSeries uses an IndexedXAxis as the XAxis type and a NumericYAxis as the YAxis type.

The following code shows how to create and add elements to an IndexedStackedLineSeries.

IndexedStackedLineSeries lineSeries = new IndexedStackedLineSeries();
IndexedStackedLineSeriesElement seriesElement1 = new IndexedStackedLineSeriesElement("Website A");
seriesElement1.Values.Add(new float[] { 5, 7, 9, 6 });
IndexedStackedLineSeriesElement seriesElement2 = new IndexedStackedLineSeriesElement("Website B");
seriesElement2.Values.Add(new float[] { 4, 2, 5, 8 });
lineSeries.Add(seriesElement1);
lineSeries.Add(seriesElement2);        
Dim MyLineSeries As IndexedStackedLineSeries = New IndexedStackedLineSeries()
Dim MySeriesElement1 As IndexedStackedLineSeriesElement = New IndexedStackedLineSeriesElement("Website A")
MySeriesElement1.Values.Add(New Single() {5, 7, 9, 6})
Dim MySeriesElement2 As IndexedStackedLineSeriesElement = New IndexedStackedLineSeriesElement("Website B")
MySeriesElement2.Values.Add(New Single() {5, 7, 9, 6})
MyLineSeries.Add(MySeriesElement1)
MyLineSeries.Add(MySeriesElement2)      

In this topic