ChartAxisCollection

Inheritance: java.lang.Object

All Implemented Interfaces: java.lang.Iterable

public class ChartAxisCollection implements Iterable

Represents a collection of chart axes.

Examples:

Shows how to work with axes collection.


 Document doc = new Document();
 DocumentBuilder builder = new DocumentBuilder(doc);

 Shape shape = builder.insertChart(ChartType.COLUMN, 500.0, 300.0);
 Chart chart = shape.getChart();

 // Hide the major grid lines on the primary and secondary Y axes.
 for (ChartAxis axis : chart.getAxes())
 {
     if (axis.getType() == ChartAxisType.VALUE)
         axis.hasMajorGridlines(false);
 }

 doc.save(getArtifactsDir() + "Charts.AxisCollection.docx");
 

Methods

MethodDescription
get(int index)Gets the axis at the specified index.
getCount()Gets the number of axes in this collection.
iterator()Returns an enumerator object.

get(int index)

public ChartAxis get(int index)

Gets the axis at the specified index.

Parameters:

ParameterTypeDescription
indexint

Returns: ChartAxis - The axis at the specified index.

getCount()

public int getCount()

Gets the number of axes in this collection.

Returns: int - The number of axes in this collection.

iterator()

public Iterator iterator()

Returns an enumerator object.

Returns: java.util.Iterator