Skip to main content

Stacked Series Elements

Version: 12.0

Stacked Series Elements

The StackedSeriesElement is a collection of values added to a stacked series and plotted as a stacked chart. Each stacked series type has two corresponding element types; a date/time or an indexed type. A StackedSeriesElement has the following child classes for adding elements to the different types of series.

info

100% stacked series elements are covered on a different documentation page (100% Stacked Series Elements).

The following lists the stacked series element types and its corresponding series.

ElementSeries
Stacked Area
DateTimeStackedAreaSeriesElementDateTimeStackedAreaSeries
IndexedStackedAreaSeriesElementIndexedStackedAreaSeries
Stacked Line
DateTimeStackedLineSeriesElementDateTimeStackedLineSeries
IndexedStackedLineSeriesElementIndexedStackedLineSeries
Stacked Bar
DateTimeStackedBarSeriesElementDateTimeStackedBarSeries
IndexedStackedBarSeriesElementIndexedStackedBarSeries
Stacked Column
DateTimeStackedColumnSeriesElementDateTimeStackedColumnSeries
IndexedStackedColumnSeriesElementIndexedStackedColumnSeries

StackedSeriesElement​

The StackedSeriesElement is a child class of the StackedSeriesElementBase class which is a child class of the SeriesElement class. The StackedSeriesElement is parent to the StackedAreaSeriesElement, StackedLineSeriesElement, StackedBarSeriesElement, and StackedColumnSeriesElement classes.

The following properties are inherited from the SeriesElement class properties and the SeriesElementBase class properties.

important

Inherited properties are not repeated in the following listings for child classes.

SeriesElement Properties​

PropertyDescription
ColorGets or sets the Color object to use for the color of the SeriesElement.
LegendGets or sets the Legend object. (Inherited from PlotAreaElement)
LegendLabelGets the LegendLabel.
NameGets the name of the SeriesElement.
PlotAreaGets the PlotArea object. (Inherited from PlotAreaElement)

StackedElementBase Properties​

PropertyDescription
DataLabelGets the ValuePositionDataLabel object to use for the DataLabel of the stacked series element. This is the default data label for the series element.
MarkerGets or sets the Marker.
PlotAreaGets the PlotArea object. (Inherited from PlotAreaElement)
ValueFormatGets or sets the format to use for the value of the PercentageDataLabel object.

StackedAreaSeriesElement​

The StackedAreaSeriesElement is parent to DateTimeStackedAreaSeriesElement and IndexedStackedAreaSeriesElement classes.

DateTimeStackedAreaSeriesElement​

The DateTimeStackedAreaSeriesElement is a collection of DateTimeStackedAreaValue values. Set or get the element values using the Values property. This property is a DateTimeStackedAreaValueList containing one or more DateTimeStackedAreaValue values. 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 values to a DateTimeStackedAreaSeriesElement.

DateTimeStackedAreaSeriesElement areaSeries = new DateTimeStackedAreaSeriesElement("Website A");
areaSeries.Values.Add(521, new DateTime(2004, 1, 1));
areaSeries.Values.Add(969, new DateTime(2004, 1, 2));
areaSeries.Values.Add(452, new DateTime(2004, 1, 3));
areaSeries.Values.Add(347, new DateTime(2004, 1, 4));
Dim MyareaSeries As DateTimeStackedAreaSeriesElement = New DateTimeStackedAreaSeriesElement("Website A")
MyareaSeries.Values.Add(521, New Date(2004, 1, 1))
MyareaSeries.Values.Add(969, New Date(2004, 1, 2))
MyareaSeries.Values.Add(452, New Date(2004, 1, 3))
MyareaSeries.Values.Add(347, New Date(2004, 1, 4))

[AreaChartExample.cs](https://github.com/DynamicPDF/examples-dynamicpdf-core-suite-dotnet-core/blob/master/dynamicpdf-csharp-examples/Examples/AreaChartExample.cs){#gitlink-id target=_blank}


[AreaChartExample.vb](https://github.com/DynamicPDF/examples-dynamicpdf-core-suite-dotnet-core/blob/master/dynamicpdf-vbnet-examples/Examples/AreaChartExample.vb){#gitlink-id target=_blank}

IndexedStackedAreaSeriesElement​

The IndexedStackedAreaSeriesElement is a collection of IndexedStackedAreaValue values. Set or get the element values using the Values property. This property is a IndexedStackedAreaValueList containing one or more IndexStackedAreaValue values.

The following code shows how to create and add values to an IndexedStackedAreaSeriesElement.

IndexedStackedAreaSeriesElement areaSeries = new IndexedStackedAreaSeriesElement("Website A");
areaSeries.Values.Add(521, 0);
areaSeries.Values.Add(969, 1);
areaSeries.Values.Add(452, 2);
areaSeries.Values.Add(347, 3);
Dim MyAreaSeries As IndexedStackedAreaSeriesElement = New IndexedStackedAreaSeriesElement("Website A")
MyAreaSeries.Values.Add(521, 0)
MyAreaSeries.Values.Add(969, 1)
MyAreaSeries.Values.Add(452, 2)
MyAreaSeries.Values.Add(347, 3)

[AreaChartExample.cs](https://github.com/DynamicPDF/examples-dynamicpdf-core-suite-dotnet-core/blob/master/dynamicpdf-csharp-examples/Examples/AreaChartExample.cs){#gitlink-id target=_blank}


[AreaChartExample.vb](https://github.com/DynamicPDF/examples-dynamicpdf-core-suite-dotnet-core/blob/master/dynamicpdf-vbnet-examples/Examples/AreaChartExample.vb){#gitlink-id target=_blank}

StackedLineSeriesElement​

A StackedLineSeriesElement is parent of the DateTimeStackedLineSeriesElement and IndexedStackedLineSeriesElement classes.

Properties​

PropertyDescription
LineCapGets or sets the LineCap.
LineJoinGets or sets the LineJoin.
LineStyleGets or sets the LineStyle.
WidthGets or sets the LineWidth.

DateTimeStackedLineSeriesElement​

The DateTimeStackedLineSeriesElement is a collection of DateTimeStackedLineValue values. Set or get the element values using the Values property. This property is a DateTimeStackedLineValueList containing one or more DateTimeStackedLineValue values. 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 values to a DateTimeStackedLineSeriesElement.

DateTimeStackedLineSeriesElement lineSeries = new DateTimeStackedLineSeriesElement("Website A");
lineSeries.Values.Add(521, new DateTime(2004, 1, 1));
lineSeries.Values.Add(969, new DateTime(2004, 1, 2));
lineSeries.Values.Add(452, new DateTime(2004, 1, 3));
lineSeries.Values.Add(347, new DateTime(2004, 1, 4));
Dim MyLineSeries As DateTimeStackedLineSeriesElement = New DateTimeStackedLineSeriesElement("Website A")
MyLineSeries.Values.Add(521, New Date(2004, 1, 1))
MyLineSeries.Values.Add(969, New Date(2004, 1, 2))
MyLineSeries.Values.Add(452, New Date(2004, 1, 3))
MyLineSeries.Values.Add(347, New Date(2004, 1, 4))

[LineChartsExample.cs](https://github.com/DynamicPDF/examples-dynamicpdf-core-suite-dotnet-core/blob/master/dynamicpdf-csharp-examples/Examples/LineChartsExample.cs){#gitlink-id target=_blank}


[LineChartsExample.vb](https://github.com/DynamicPDF/examples-dynamicpdf-core-suite-dotnet-core/blob/master/dynamicpdf-vbnet-examples/Examples/LineChartsExample.vb){#gitlink-id target=_blank}

IndexedStackedLineSeriesElement​

The IndexedStackedLineSeriesElement is a collection of IndexStackedLineValue values. Set or get the element values using the Values property. This property is a IndexedStackedLineValueList containing one or more IndexStackedLineValue values.

The following code shows how to create and add values to an IndexedStackedLineSeriesElement.

IndexedStackedLineSeriesElement lineSeries = new IndexedStackedLineSeriesElement("Website A");
lineSeries.Values.Add(521, 0);
lineSeries.Values.Add(969, 1);
lineSeries.Values.Add(452, 2);
lineSeries.Values.Add(347, 3);
Dim MyLineSeries As IndexedStackedLineSeriesElement = New IndexedStackedLineSeriesElement("Website A")
MyLineSeries.Values.Add(521, 0)
MyLineSeries.Values.Add(969, 1)
MyLineSeries.Values.Add(452, 2)
MyLineSeries.Values.Add(347, 3)

[LineChartsExample.cs](https://github.com/DynamicPDF/examples-dynamicpdf-core-suite-dotnet-core/blob/master/dynamicpdf-csharp-examples/Examples/LineChartsExample.cs){#gitlink-id target=_blank}


[LineChartsExample.vb](https://github.com/DynamicPDF/examples-dynamicpdf-core-suite-dotnet-core/blob/master/dynamicpdf-vbnet-examples/Examples/LineChartsExample.vb){#gitlink-id target=_blank}

StackedBarSeriesElement​

The StackedBarSeriesElement is parent to the DateTimeStackedBarSeriesElement and IndexedStackedBarSeriesElement classes.

DateTimeStackedBarSeriesElement​

The DateTimeStackedBarSeriesElement is a collection of DateTimeStackedBarValue values. Set or get the element values using the Values property. This property is a DateTimeStackedBarValueList containing one or more DateTimeStackedBarValue values. 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 values to a DateTimeStackedBarSeriesElement.

DateTimeStackedBarSeriesElement barSeries = new DateTimeStackedBarSeriesElement("Website A");
barSeries.Values.Add(521, new DateTime(2004, 1, 1));
barSeries.Values.Add(969, new DateTime(2004, 1, 2));
barSeries.Values.Add(452, new DateTime(2004, 1, 3));
barSeries.Values.Add(347, new DateTime(2004, 1, 4));
Dim MyBarSeries As DateTimeStackedBarSeriesElement = New DateTimeStackedBarSeriesElement("Website A")
MyBarSeries.Values.Add(521, New Date(2004, 1, 1))
MyBarSeries.Values.Add(969, New Date(2004, 1, 2))
MyBarSeries.Values.Add(452, New Date(2004, 1, 3))
MyBarSeries.Values.Add(347, New Date(2004, 1, 4))

[BarChartsExample.cs](https://github.com/DynamicPDF/examples-dynamicpdf-core-suite-dotnet-core/blob/master/dynamicpdf-csharp-examples/Examples/BarChartsExample.cs){#gitlink-id target=_blank}


[BarChartsExample.vb](https://github.com/DynamicPDF/examples-dynamicpdf-core-suite-dotnet-core/blob/master/dynamicpdf-vbnet-examples/Examples/BarChartsExample.vb){#gitlink-id target=_blank}

IndexedStackedBarSeriesElement​

The IndexedStackedBarSeriesElement is a collection of IndexStackedBarValue values. Set or get the element values using the Values property. This property is a IndexedStackedBarValueList containing one or more IndexStackedBarValue values. All other properties of the IndexedStackedBarSeriesElement are inherited from its parent class.

The following code shows how to create and add values to an IndexedStackedBarSeriesElement.

IndexedStackedBarSeriesElement barSeries = new IndexedStackedBarSeriesElement("Website A");
barSeries.Values.Add(521, 0);
barSeries.Values.Add(969, 1);
barSeries.Values.Add(452, 2);
barSeries.Values.Add(347, 3);
Dim MyBarSeries As DateTimeStackedBarSeriesElement = New DateTimeStackedBarSeriesElement("Website A")
MyBarSeries.Values.Add(521, New Date(2004, 1, 1))
MyBarSeries.Values.Add(969, New Date(2004, 1, 2))
MyBarSeries.Values.Add(452, New Date(2004, 1, 3))
MyBarSeries.Values.Add(347, New Date(2004, 1, 4))

[BarChartsExample.cs](https://github.com/DynamicPDF/examples-dynamicpdf-core-suite-dotnet-core/blob/master/dynamicpdf-csharp-examples/Examples/BarChartsExample.cs){#gitlink-id target=_blank}


[BarChartsExample.vb](https://github.com/DynamicPDF/examples-dynamicpdf-core-suite-dotnet-core/blob/master/dynamicpdf-vbnet-examples/Examples/BarChartsExample.vb){#gitlink-id target=_blank}

StackedColumnSeriesElement​

A StackedColumnSeriesElement is parent to the DateTimeStackedColumnSeriesElement and IndexedStackedColumnSeriesElement classes.

DateTimeStackedColumnSeriesElement​

The DateTimeStackedColumnSeriesElement is a collection of DateTimeStackedColumn values. Set or get the element values using the Values property. This property is a DateTimeStackedColumnValueList containing one or more DateTimeStackedColumnValue values. It uses the .NET Framework's DateTime structure for setting the date portion of the values in the series. All other properties of the DateTimeStackedColumnSeriesElement are inherited from its parent class.

The following code shows how to create and add values to a DateTimeStackedColumnSeriesElement.

DateTimeStackedColumnSeriesElement columnSeries = new DateTimeStackedColumnSeriesElement("Website A");
columnSeries.Values.Add(521, new DateTime(2004, 1, 1));
columnSeries.Values.Add(969, new DateTime(2004, 1, 2));
columnSeries.Values.Add(452, new DateTime(2004, 1, 3));
columnSeries.Values.Add(347, new DateTime(2004, 1, 4));
Dim MyColumnSeries As DateTimeStackedColumnSeriesElement = New DateTimeStackedColumnSeriesElement("Website A")
MyColumnSeries.Values.Add(521, New DateTime(2004, 1, 1))
MyColumnSeries.Values.Add(969, New DateTime(2004, 1, 2))
MyColumnSeries.Values.Add(452, New DateTime(2004, 1, 3))
MyColumnSeries.Values.Add(347, New DateTime(2004, 1, 4))

[ColumnChartExample.cs](https://github.com/DynamicPDF/examples-dynamicpdf-core-suite-dotnet-core/blob/master/dynamicpdf-csharp-examples/Examples/ColumnChartExample.cs){#gitlink-id target=_blank}


[ColumnChartExample.vb](https://github.com/DynamicPDF/examples-dynamicpdf-core-suite-dotnet-core/blob/master/dynamicpdf-vbnet-examples/Examples/ColumnChartExample.vb){#gitlink-id target=_blank}

IndexedStackedColumnSeriesElement​

The IndexedStackedColumnSeriesElement is a collection of IndexedStackedColumnValue values. Set or get the element values using the Values property. This property is a IndexedStackedColumnValueList containing one or more IndexStackedColumnValue values. All other properties of the IndexedStackedColumnSeriesElement are inherited from its parent class.

The following code shows how to create and add values to an IndexedStackedColumnSeriesElement.

IndexedStackedColumnSeriesElement columnSeries = new IndexedStackedColumnSeriesElement("Website A");
columnSeries.Values.Add(521, 0);
columnSeries.Values.Add(969, 1);
columnSeries.Values.Add(452, 2);
columnSeries.Values.Add(347, 3);
Dim MyColumnSeries As IndexedStackedColumnSeriesElement = New IndexedStackedColumnSeriesElement("Website A")
MyColumnSeries.Values.Add(521, 0)
MyColumnSeries.Values.Add(969, 1)
MyColumnSeries.Values.Add(452, 2)
MyColumnSeries.Values.Add(347, 3)

[ColumnChartExample.cs](https://github.com/DynamicPDF/examples-dynamicpdf-core-suite-dotnet-core/blob/master/dynamicpdf-csharp-examples/Examples/ColumnChartExample.cs){#gitlink-id target=_blank}


[ColumnChartExample.vb](https://github.com/DynamicPDF/examples-dynamicpdf-core-suite-dotnet-core/blob/master/dynamicpdf-vbnet-examples/Examples/ColumnChartExample.vb){#gitlink-id target=_blank}