ChartSeriesGroupCollection
Inheritance: java.lang.Object
All Implemented Interfaces: java.lang.Iterable
public class ChartSeriesGroupCollection implements Iterable
Represents a collection of ChartSeriesGroup objects.
Remarks:
To learn more, visit the Working with Charts documentation article.
Methods
Method | Description |
---|---|
add(int seriesType) | |
get(int index) | Returns a ChartSeriesGroup at the specified index. |
getCount() | Returns the number of series groups in this collection. |
iterator() | Returns an enumerator object. |
removeAt(int index) | Removes a series group at the specified index. |
add(int seriesType)
public ChartSeriesGroup add(int seriesType)
Parameters:
Parameter | Type | Description |
---|---|---|
seriesType | int |
Returns: ChartSeriesGroup
get(int index)
public ChartSeriesGroup get(int index)
Returns a ChartSeriesGroup at the specified index.
Examples:
Show how to remove secondary axis.
Document doc = new Document(getMyDir() + "Combo chart.docx");
Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);
Chart chart = shape.getChart();
ChartSeriesGroupCollection seriesGroups = chart.getSeriesGroups();
// Find secondary axis and remove from the collection.
for (int i = 0; i < seriesGroups.getCount(); i++)
if (seriesGroups.get(i).getAxisGroup() == AxisGroup.SECONDARY)
seriesGroups.removeAt(i);
Parameters:
Parameter | Type | Description |
---|---|---|
index | int |
Returns: ChartSeriesGroup - A ChartSeriesGroup at the specified index.
getCount()
public int getCount()
Returns the number of series groups in this collection.
Examples:
Show how to remove secondary axis.
Document doc = new Document(getMyDir() + "Combo chart.docx");
Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);
Chart chart = shape.getChart();
ChartSeriesGroupCollection seriesGroups = chart.getSeriesGroups();
// Find secondary axis and remove from the collection.
for (int i = 0; i < seriesGroups.getCount(); i++)
if (seriesGroups.get(i).getAxisGroup() == AxisGroup.SECONDARY)
seriesGroups.removeAt(i);
Returns: int - The number of series groups in this collection.
iterator()
public Iterator iterator()
Returns an enumerator object.
Returns: java.util.Iterator
removeAt(int index)
public void removeAt(int index)
Removes a series group at the specified index. All child series will be removed from the chart.
Examples:
Show how to remove secondary axis.
Document doc = new Document(getMyDir() + "Combo chart.docx");
Shape shape = (Shape)doc.getChild(NodeType.SHAPE, 0, true);
Chart chart = shape.getChart();
ChartSeriesGroupCollection seriesGroups = chart.getSeriesGroups();
// Find secondary axis and remove from the collection.
for (int i = 0; i < seriesGroups.getCount(); i++)
if (seriesGroups.get(i).getAxisGroup() == AxisGroup.SECONDARY)
seriesGroups.removeAt(i);
Parameters:
Parameter | Type | Description |
---|---|---|
index | int |