CategoryAxis Class
A category axis in a standard chart.
Declaration
public class CategoryAxis extends Axis
Remarks
A category axis is the argument axis in area, bar, line, radar, stock, and surface charts (2D and 3D). Axis labels display series arguments. If the arguments of the first series refer to chart data cells that contain dates, the chart uses a DateAxis as the argument axis.
Refer to the following help topic for additional information: Customize Chart Axes — Presentation API for Java.
Inherited Members
Inheritance
CategoryAxis()
Initializes a new instance of the CategoryAxis class.
Declaration
public CategoryAxis()
Methods
deepClone() Method
Returns a deep copy of this CategoryAxis instance.
Declaration
public CategoryAxis deepClone()
Returns
| Type | Description |
|---|---|
CategoryAxis |
A deep copy of this |
getAuto() Method
Returns whether the axis type (category or date axis) depends on argument data.
Declaration
public boolean getAuto()
Returns
| Type | Description |
|---|---|
| boolean |
|
getAxisType() Method
Returns the axis type.
Declaration
public AxisType getAxisType()
Returns
| Type | Description |
|---|---|
| AxisType | The axis type, |
getLabelAlignment() Method
Returns the horizontal alignment of axis labels.
Declaration
public AxisLabelAlignmentType getLabelAlignment()
Returns
| Type | Description |
|---|---|
| AxisLabelAlignmentType | The horizontal alignment of axis labels. |
getLabelOffset() Method
Returns the distance between axis labels and the axis.
Declaration
public int getLabelOffset()
Returns
| Type | Description |
|---|---|
| int | The distance between axis labels and the axis. |
getNoMultilevelLabels() Method
Returns whether multilevel labels are disabled.
Declaration
public boolean getNoMultilevelLabels()
Returns
| Type | Description |
|---|---|
| boolean |
|
getTickLabelSkip() Method
Returns the interval between displayed tick labels.
Declaration
public int getTickLabelSkip()
Returns
| Type | Description |
|---|---|
| int | The interval between displayed tick labels. |
getTickMarkSkip() Method
Returns the interval between displayed tick marks.
Declaration
public int getTickMarkSkip()
Returns
| Type | Description |
|---|---|
| int | The interval between displayed tick marks. |
setAuto(boolean value) Method
Sets whether the axis type (category or date axis) depends on argument data.
Declaration
public void setAuto(boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | boolean |
|
setLabelAlignment(AxisLabelAlignmentType value) Method
Sets the horizontal alignment of axis labels.
Declaration
public void setLabelAlignment(AxisLabelAlignmentType value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | AxisLabelAlignmentType | The horizontal alignment of axis labels. |
Exceptions
| Type | Description |
|---|---|
| NullPointerException | Thrown if the |
Remarks
The setLabelAlignment(value) method accepts the following values:
| Value | Description |
|---|---|
| CENTER | Indicates centered labels. |
| LEFT | Indicates left-aligned labels. |
| RIGHT | Indicates right-aligned labels. |
If you do not call the setLabelAlignment(value) method, the API uses AxisLabelAlignmentType.CENTER.
setLabelOffset(int value) Method
Sets the distance between axis labels and the axis.
Declaration
public void setLabelOffset(int value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | int | The distance between axis labels and the axis. |
Exceptions
| Type | Description |
|---|---|
| ArgumentOutOfRangeException | Thrown if the axis is in a chart on a slide and the |
Remarks
The value range is from 0 to 1000. If you do not call the setLabelOffset(value) method, the API uses 0.
setNoMultilevelLabels(boolean value) Method
Sets whether to disable multilevel labels.
Declaration
public void setNoMultilevelLabels(boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | boolean |
|
Remarks
A category axis displays multilevel labels if series arguments refer to a cell range with multiple rows and columns (for example, A2:B5). If you call the setNoMultilevelLabels(true) method, the axis displays labels as plain text without a label hierarchy.
If you do not call the setNoMultilevelLabels(value) method, the API uses false.
setTickLabelSkip(int value) Method
Sets the interval between displayed tick labels.
Declaration
public void setTickLabelSkip(int value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | int | The interval between displayed tick labels. |
Exceptions
| Type | Description |
|---|---|
| ArgumentException | Thrown if the axis is in a chart on a slide and the |
Remarks
The value must be 1 or greater. For example, if you call the setTickLabelSkip(2) method, the axis displays every second tick label. If you do not call the setTickLabelSkip(value) method, the API uses 1, and the axis displays all tick labels.
setTickMarkSkip(int value) Method
Sets the interval between displayed tick marks.
Declaration
public void setTickMarkSkip(int value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | int | The interval between displayed tick marks. |
Exceptions
| Type | Description |
|---|---|
| ArgumentException | Thrown if the axis is in a chart on a slide and the |
Remarks
The value must be 1 or greater. For example, if you call the setTickMarkSkip(2) method, the axis displays every second tick mark. If you do not call the setTickMarkSkip(value) method, the API uses 1, and the axis displays all tick marks.