DataLabelBase Class
The base class for data labels in standard charts.
Declaration
public abstract class DataLabelBase extends OfficeObject
Remarks
The DataLabel class derives from the DataLabelBase class.
A data label can display the data point value, the category name, the series name, the legend key, and text from a cell range. The following methods specify data label content:
- setShowValue(boolean value)
- setShowCategoryName(boolean value)
- setShowSeriesText(boolean value)
- setShowLegendKey(boolean value)
- setShowDataLabelRange(boolean value)
The setSeparator(String value) method specifies the separator between displayed parts of the data label text.
Refer to the following help topic for additional information: Customize Chart Data Labels — Presentation API for Java.
Inherited Members
Inheritance
Methods
getHidden() Method
Returns whether the data label is hidden.
Declaration
public boolean getHidden()
Returns
| Type | Description |
|---|---|
| boolean |
|
getNumberFormat() Method
Returns number format settings for numeric values in the data label.
Declaration
public NumberFormatOptions getNumberFormat()
Returns
| Type | Description |
|---|---|
| NumberFormatOptions | Number format settings. |
getProperties() Method
Returns fill, outline, and shape effect settings for the data label.
Declaration
public ChartElement getProperties()
Returns
| Type | Description |
|---|---|
| ChartElement | Fill, outline, and shape effect settings. |
getSeparator() Method
Returns the separator between parts of the data label text.
Declaration
public String getSeparator()
Returns
| Type | Description |
|---|---|
| String | The separator string. |
getShowCategoryName() Method
Returns whether the data label displays the category name.
Declaration
public boolean getShowCategoryName()
Returns
| Type | Description |
|---|---|
| boolean |
|
getShowDataLabelRange() Method
Returns whether the data label displays text from a cell range.
Declaration
public boolean getShowDataLabelRange()
Returns
| Type | Description |
|---|---|
| boolean |
|
getShowLegendKey() Method
Returns whether the data label displays the legend key.
Declaration
public boolean getShowLegendKey()
Returns
| Type | Description |
|---|---|
| boolean |
|
getShowSeriesText() Method
Returns whether the data label displays the series name.
Declaration
public boolean getShowSeriesText()
Returns
| Type | Description |
|---|---|
| boolean |
|
getShowValue() Method
Returns whether the data label displays the data point value.
Declaration
public boolean getShowValue()
Returns
| Type | Description |
|---|---|
| boolean |
|
getTextProperties() Method
Returns text formatting settings for the data label.
Declaration
public TextProperties getTextProperties()
Returns
| Type | Description |
|---|---|
| TextProperties | Text formatting settings. |
setHidden(boolean value) Method
Sets whether to hide the data label.
Declaration
public void setHidden(boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | boolean |
|
setNumberFormat(NumberFormatOptions value) Method
Sets number format settings for numeric values in the data label.
Declaration
public void setNumberFormat(NumberFormatOptions value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | NumberFormatOptions | Number format settings. |
setProperties(ChartElement value) Method
Sets fill, outline, and shape effect settings for the data label.
Declaration
public void setProperties(ChartElement value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | ChartElement | Fill, outline, and shape effect settings. |
setSeparator(String value) Method
Sets the separator between parts of the data label text.
Declaration
public void setSeparator(String value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | String | The separator string. |
Remarks
If you call the setSeparator(null) method, the API uses a comma followed by a space as the separator. For a new data label, the getSeparator() method returns null.
setShowCategoryName(boolean value) Method
Sets whether to display the category name in the data label.
Declaration
public void setShowCategoryName(boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | boolean |
|
setShowDataLabelRange(boolean value) Method
Sets whether to display text from a cell range in the data label.
Declaration
public void setShowDataLabelRange(boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | boolean |
|
setShowLegendKey(boolean value) Method
Sets whether to display the legend key in the data label.
Declaration
public void setShowLegendKey(boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | boolean |
|
setShowSeriesText(boolean value) Method
Sets whether to display the series name in the data label.
Declaration
public void setShowSeriesText(boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | boolean |
|
setShowValue(boolean value) Method
Sets whether to display the data point value in the data label.
Declaration
public void setShowValue(boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | boolean |
|
setTextProperties(TextProperties value) Method
Sets text formatting settings for the data label.
Declaration
public void setTextProperties(TextProperties value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | TextProperties | Text formatting settings. |