DateAxis Class
A date axis in a standard chart.
Declaration
public class DateAxis extends Axis
Remarks
A chart uses a date axis as the argument axis if the arguments of the first series refer to chart data cells that contain dates. A date axis displays dates at intervals of days, months, or years.
Refer to the following help topic for additional information: Customize Chart Axes — Presentation API for Java.
Inherited Members
Inheritance
DateAxis()
Initializes a new instance of the DateAxis class.
Declaration
public DateAxis()
Methods
deepClone() Method
Returns a deep copy of this DateAxis instance.
Declaration
public DateAxis deepClone()
Returns
| Type | Description |
|---|---|
DateAxis |
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, |
getBaseTimeUnit() Method
Returns the base time unit of the date axis.
Declaration
public AxisTimeUnitType getBaseTimeUnit()
Returns
| Type | Description |
|---|---|
| AxisTimeUnitType | The base time unit. |
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. |
getMajorTimeUnit() Method
Returns the time unit of the interval between major tick marks.
Declaration
public AxisTimeUnitType getMajorTimeUnit()
Returns
| Type | Description |
|---|---|
| AxisTimeUnitType | The time unit of the major interval. |
getMajorUnit() Method
Returns the interval between major tick marks.
Declaration
public double getMajorUnit()
Returns
| Type | Description |
|---|---|
| double | The interval between major tick marks. |
getMinorTimeUnit() Method
Returns the time unit of the interval between minor tick marks.
Declaration
public AxisTimeUnitType getMinorTimeUnit()
Returns
| Type | Description |
|---|---|
| AxisTimeUnitType | The time unit of the minor interval. |
getMinorUnit() Method
Returns the interval between minor tick marks.
Declaration
public double getMinorUnit()
Returns
| Type | Description |
|---|---|
| double | The interval between minor 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 |
|
setBaseTimeUnit(AxisTimeUnitType value) Method
Sets the base time unit of the date axis.
Declaration
public void setBaseTimeUnit(AxisTimeUnitType value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | AxisTimeUnitType | The base time unit. |
Exceptions
| Type | Description |
|---|---|
| NullPointerException | Thrown if the |
Remarks
The base time unit specifies the interval between data points on the axis. The setBaseTimeUnit(value) method accepts the following values:
| Value | Description |
|---|---|
| AUTO | Indicates that the time unit is selected automatically. |
| DAYS | Indicates days. |
| MONTHS | Indicates months. |
| YEARS | Indicates years. |
If you do not call the setBaseTimeUnit(value) method, the API uses AxisTimeUnitType.DAYS.
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.
setMajorTimeUnit(AxisTimeUnitType value) Method
Sets the time unit of the interval between major tick marks.
Declaration
public void setMajorTimeUnit(AxisTimeUnitType value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | AxisTimeUnitType | The time unit of the major interval. |
Exceptions
| Type | Description |
|---|---|
| NullPointerException | Thrown if the |
Remarks
Call the setMajorUnit(double value) method to specify the number of time units between major tick marks. The setMajorTimeUnit(value) method accepts the following values:
| Value | Description |
|---|---|
| AUTO | Indicates that the time unit is selected automatically. |
| DAYS | Indicates days. |
| MONTHS | Indicates months. |
| YEARS | Indicates years. |
If you do not call the setMajorTimeUnit(value) method, the API uses AxisTimeUnitType.DAYS.
setMajorUnit(double value) Method
Sets the interval between major tick marks.
Declaration
public void setMajorUnit(double value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | double | The interval between major tick marks. |
Exceptions
| Type | Description |
|---|---|
| ArgumentException | Thrown if the axis is in a chart on a slide and the |
Remarks
The setMajorTimeUnit(AxisTimeUnitType value) method specifies the time unit of the interval.
The value must be 0 or greater. Call the setMajorUnit(0) method to use an automatic interval between major tick marks. If you do not call the setMajorUnit(value) method, the API uses 0.
setMinorTimeUnit(AxisTimeUnitType value) Method
Sets the time unit of the interval between minor tick marks.
Declaration
public void setMinorTimeUnit(AxisTimeUnitType value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | AxisTimeUnitType | The time unit of the minor interval. |
Exceptions
| Type | Description |
|---|---|
| NullPointerException | Thrown if the |
Remarks
Call the setMinorUnit(double value) method to specify the number of time units between minor tick marks. The setMinorTimeUnit(value) method accepts the following values:
| Value | Description |
|---|---|
| AUTO | Indicates that the time unit is selected automatically. |
| DAYS | Indicates days. |
| MONTHS | Indicates months. |
| YEARS | Indicates years. |
If you do not call the setMinorTimeUnit(value) method, the API uses AxisTimeUnitType.DAYS.
setMinorUnit(double value) Method
Sets the interval between minor tick marks.
Declaration
public void setMinorUnit(double value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | double | The interval between minor tick marks. |
Exceptions
| Type | Description |
|---|---|
| ArgumentException | Thrown if the axis is in a chart on a slide and the |
Remarks
The setMinorTimeUnit(AxisTimeUnitType value) method specifies the time unit of the interval.
The value must be 0 or greater. Call the setMinorUnit(0) method to use an automatic interval between minor tick marks. If you do not call the setMinorUnit(value) method, the API uses 0.