NumberFormatOptions Class
Contains number format settings for chart labels.
Declaration
public class NumberFormatOptions extends OfficeObject
Remarks
Call the AxisBase.setNumberFormat(value) method to specify number format settings for axis labels.
Refer to the following help topics for additional information:
- Customize Chart Axes — Presentation API for Java
- Customize Chart Data Labels — Presentation API for Java
Inherited Members
Inheritance
NumberFormatOptions()
Initializes a new instance of the NumberFormatOptions class.
Declaration
public NumberFormatOptions()
Methods
createDefault() Method
Creates number format settings with the General format code linked to source data.
Declaration
public static NumberFormatOptions createDefault()
Returns
| Type | Description |
|---|---|
NumberFormatOptions |
Number format settings with the General format code linked to source data. |
deepClone() Method
Returns a deep copy of this NumberFormatOptions instance.
Declaration
public NumberFormatOptions deepClone()
Returns
| Type | Description |
|---|---|
NumberFormatOptions |
A deep copy of this |
getFormatCode() Method
Returns the number format code.
Declaration
public String getFormatCode()
Returns
| Type | Description |
|---|---|
| String | The number format code. |
getIsSourceLinked() Method
Returns whether labels use the number format of source data.
Declaration
public boolean getIsSourceLinked()
Returns
| Type | Description |
|---|---|
| boolean |
|
setFormatCode(String value) Method
Sets the number format code.
Declaration
public void setFormatCode(String value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | String | The number format code. |
Remarks
Format codes follow the Microsoft Excel number format syntax (for example, 0.00 or $0).
Note
The format code takes effect when you call the setIsSourceLinked(false) method.
setIsSourceLinked(boolean value) Method
Sets whether labels use the number format of source data.
Declaration
public void setIsSourceLinked(boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | boolean |
|
Remarks
If you call the setIsSourceLinked(true) method, labels use the number format of source data cells. Call the setIsSourceLinked(false) method to apply the format code specified by the setFormatCode(String value) method.