A Stacked100PercentSeries is a collection of values to be displayed on a graph. When multiple 100% 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 as a percentage of the total for that index or point in time. There are four different groups of 100% Stacked Series corresponding to the four different types of stacked charts (100% stacked area, 100% stacked bar, 100% stacked column and 100% stacked line). Each 100% stacked series group will have both an indexed and a date-time type. 100% Stacked Pie and Scatter charts do not exist.
100% Stacked Area Series
100% Stacked Bar Series
100% Stacked Column Series
100% Stacked Line Series
An Area chart has two types of 100% stacked series:
- DateTime100PercentStackedAreaSeries
- This is a collection of DateTime100PercentStackedAreaSeriesElement each corresponding to a particular point in time that will be plotted as a Stacked Area chart. A DateTime100PercentStackedAreaSeries uses DateTimeXAxis as the XAxis type and PercentageYAxis as the YAxis type. It uses the Calendar class for setting the time portion of the values in the series.
The below code shows how to create and add elements to a DateTime100PercentStackedAreaSeries.
[Java] DateTime100PercentStackedAreaSeries stackedAreaSeries = new DateTime100PercentStackedAreaSeries(); Calendar p0=Calendar.getInstance(); p0.set(2004,0,1); Calendar p1=Calendar.getInstance(); p1.set(2004,1,1); Calendar p2=Calendar.getInstance(); p2.set(2004,2,1); DateTime100PercentStackedAreaSeriesElement areaSeriesElement1 = new DateTime100PercentStackedAreaSeriesElement("Website A"); areaSeriesElement1.getValues().add(51, p0); areaSeriesElement1.getValues().add(99, p1); areaSeriesElement1.getValues().add(42, p2); DateTime100PercentStackedAreaSeriesElement areaSeriesElement2 = new DateTime100PercentStackedAreaSeriesElement("Website B"); areaSeriesElement2.getValues().add(11, p0); areaSeriesElement2.getValues().add(30, p1); areaSeriesElement2.getValues().add(22, p2); stackedAreaSeries.add(areaSeriesElement1); stackedAreaSeries.add(areaSeriesElement2);
- Indexed100PercentStackedAreaSeries
This is a collection of Indexed100PercentStackedAreaSeriesElement that will be plotted as a StackedAreaSeries in an indexed order. An IndexedStackedAreaSeries uses an IndexedXAxis as the XAxis type and a PercentageYAxis as the YAxis type.
The below code shows how to create and add elements to an Indexed100PercentStackedAreaSeries.
[Java] Indexed100PercentStackedAreaSeries areaSeries = new Indexed100PercentStackedAreaSeries(); Indexed100PercentStackedAreaSeriesElement seriesElement1 = new Indexed100PercentStackedAreaSeriesElement("Website A"); seriesElement1.getValues().add(new float[] { 5, 7, 9, 6 }); Indexed100PercentStackedAreaSeriesElement seriesElement2 = new Indexed100PercentStackedAreaSeriesElement("Website B"); seriesElement2.getValues().add(new float[] { 4, 2, 5, 8 }); areaSeries.add(seriesElement1); areaSeries.add(seriesElement2);
A Bar chart has two types of 100% stacked series:
- DateTime100PercentStackedBarSeries
- This is a collection of DateTime100PercentStackedBarSeriesElement each corresponding to a particular point in time that will be plotted as a Stacked Bar chart. A DateTime100PercentStackedBarSeries uses PercentageXAxis as XAxis type and DateTimeYAxis as the YAxis type. It uses the Calendar class for setting the time portion of the values in the series.
The below code shows how to create and add elements to a DateTime100PercentStackedBarSeries.
[Java] DateTime100PercentStackedBarSeries stackedBarSeries = new DateTime100PercentStackedBarSeries(); Calendar p0=Calendar.getInstance(); p0.set(2004,0,1); Calendar p1=Calendar.getInstance(); p1.set(2004,1,1); Calendar p2=Calendar.getInstance(); p2.set(2004,2,1); DateTime100PercentStackedBarSeriesElement barSeriesElement1 = new DateTime100PercentStackedBarSeriesElement("Website A"); barSeriesElement1.getValues().add(51, p0); barSeriesElement1.getValues().add(99, p1); barSeriesElement1.getValues().add(42, p2); DateTime100PercentStackedBarSeriesElement barSeriesElement2 = new DateTime100PercentStackedBarSeriesElement("Website B"); barSeriesElement2.getValues().add(11, p0); barSeriesElement2.getValues().add(30, p1); barSeriesElement2.getValues().add(22, p2); stackedBarSeries.add(barSeriesElement1); stackedBarSeries.add(barSeriesElement2);
- Indexed100PercentStackedBarSeries
This is a collection of Indexed100PercentStackedBarSeriesElement that will be plotted as a StackedBarSeries in an indexed order. An IndexedStackedBarSeries uses a PercentageXAxis as the XAxis type and an IndexedYAxis as the YAxis type.
The below code shows how to create and add elements to an Indexed100PercentStackedBarSeries.
[Java] Indexed100PercentStackedBarSeries barSeries = new Indexed100PercentStackedBarSeries(); Indexed100PercentStackedBarSeriesElement seriesElement1 = new Indexed100PercentStackedBarSeriesElement("Website A"); seriesElement1.getValues().add(new float[] { 5, 7, 9, 6 }); Indexed100PercentStackedBarSeriesElement seriesElement2 = new Indexed100PercentStackedBarSeriesElement("Website B"); seriesElement2.getValues().add(new float[] { 4, 2, 5, 8 }); barSeries.add(seriesElement1); barSeries.add(seriesElement2);
A Column chart has two types of 100% stacked series:
- DateTime100PercentStackedColumnSeries
- This is a collection of DateTime100PercentStackedColumnSeriesElement each corresponding to a particular point in time that will be plotted as a Stacked Column chart. A DateTime100PercentStackedColumnSeries uses DateTimeXAxis as the XAxis type and PercentageYAxis as the YAxis type. It uses the Calendar class for setting the time portion of the values in the series.
The below code shows how to create and add elements to a DateTime100PercentStackedColumnSeries.
[Java] DateTime100PercentStackedColumnSeries stackedColumnSeries = new DateTime100PercentStackedColumnSeries(); Calendar p0=Calendar.getInstance(); p0.set(2004,0,1); Calendar p1=Calendar.getInstance(); p1.set(2004,1,1); Calendar p2=Calendar.getInstance(); p2.set(2004,2,1); DateTime100PercentStackedColumnSeriesElement columnSeriesElement1 = new DateTime100PercentStackedColumnSeriesElement("Website A"); columnSeriesElement1.getValues().add(51, p0); columnSeriesElement1.getValues().add(99, p1); columnSeriesElement1.getValues().add(42, p2)); DateTime100PercentStackedColumnSeriesElement columnSeriesElement2 = new DateTime100PercentStackedColumnSeriesElement("Website B"); columnSeriesElement2.getValues().add(11, p0); columnSeriesElement2.getValues().add(30, p1); columnSeriesElement2.getValues().add(22, p2); stackedColumnSeries.add(columnSeriesElement1); stackedColumnSeries.add(columnSeriesElement2);
- Indexed100PercentStackedColumnSeries
This is a collection of Indexed100PercentStackedColumnSeriesElement that will be plotted as a StackedColumnSeries in an indexed order. An IndexedStackedColumnSeries uses an IndexedXAxis as the XAxis type and a PercentageYAxis as the YAxis type.
The below code shows how to create and add elements to an Indexed100PercentStackedColumnSeries.
[Java] Indexed100PercentStackedColumnSeries columnSeries = new Indexed100PercentStackedColumnSeries(); Indexed100PercentStackedColumnSeriesElement seriesElement1 = new Indexed100PercentStackedColumnSeriesElement("Website A"); seriesElement1.getValues().add(new float[] { 5, 7, 9, 6 }); Indexed100PercentStackedColumnSeriesElement seriesElement2 = new Indexed100PercentStackedColumnSeriesElement("Website B"); seriesElement2.getValues().add(new float[] { 4, 2, 5, 8 }); columnSeries.add(seriesElement1); columnSeries.add(seriesElement2);
A Line chart has two types of 100% stacked series:
- DateTime100PercentStackedLineSeries
- This is a collection of DateTime100PercentStackedLineSeriesElement each corresponding to a particular point in time that will be plotted as a Stacked Line chart. A DateTime100PercentStackedLineSeries uses DateTimeXAxis as the XAxis type and PercentageYAxis as the YAxis type. It uses the Calendar class for setting the time portion of the values in the series.
The below code shows how to create and add elements to a DateTime100PercentStackedLineSeries.
[Java] DateTime100PercentStackedLineSeries stackedLineSeries = new DateTime100PercentStackedLineSeries(); Calendar p0=Calendar.getInstance(); p0.set(2004,0,1); Calendar p1=Calendar.getInstance(); p1.set(2004,1,1); Calendar p2=Calendar.getInstance(); p2.set(2004,2,1); DateTime100PercentStackedLineSeriesElement lineSeriesElement1 = new DateTime100PercentStackedLineSeriesElement("Website A"); lineSeriesElement1.getValues().add(51, p0); lineSeriesElement1.getValues().add(99, p1); lineSeriesElement1.getValues().add(42, p2); DateTime100PercentStackedLineSeriesElement lineSeriesElement2 = new DateTime100PercentStackedLineSeriesElement("Website B"); lineSeriesElement2.getValues().add(11, p0); lineSeriesElement2.getValues().add(30, p1); lineSeriesElement2.getValues().add(22, p2); stackedLineSeries.add(lineSeriesElement1); stackedLineSeries.add(lineSeriesElement2);
- Indexed100PercentStackedLineSeries
This is a collection of Indexed100PercentStackedLineSeriesElement that will be plotted as a StackedLineSeries in an indexed order. An IndexedStackedLineSeries uses an IndexedXAxis as the XAxis type and a PercentageYAxis as the YAxis type.
The below code shows how to create and add elements to an Indexed100PercentStackedLineSeries.
[Java] Indexed100PercentStackedLineSeries lineSeries = new Indexed100PercentStackedLineSeries(); Indexed100PercentStackedLineSeriesElement seriesElement1 = new Indexed100PercentStackedLineSeriesElement("Website A"); seriesElement1.getValues().add(new float[] { 5, 7, 9, 6 }); Indexed100PercentStackedLineSeriesElement seriesElement2 = new Indexed100PercentStackedLineSeriesElement("Website B"); seriesElement2.getValues().add(new float[] { 4, 2, 5, 8 }); lineSeries.add(seriesElement1); lineSeries.add(seriesElement2);