Skip to main content

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:

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

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.initFields()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
JavaObject
OfficeObject
DataLabelBase
See Also

Methods

getHidden() Method

Returns whether the data label is hidden.

Declaration

public boolean getHidden()

Returns

Type Description
boolean

true if the data label is hidden; otherwise, false.

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

true if the data label displays the category name; otherwise, false.

getShowDataLabelRange() Method

Returns whether the data label displays text from a cell range.

Declaration

public boolean getShowDataLabelRange()

Returns

Type Description
boolean

true if the data label displays text from a cell range; otherwise, false.

getShowLegendKey() Method

Returns whether the data label displays the legend key.

Declaration

public boolean getShowLegendKey()

Returns

Type Description
boolean

true if the data label displays the legend key; otherwise, false.

getShowSeriesText() Method

Returns whether the data label displays the series name.

Declaration

public boolean getShowSeriesText()

Returns

Type Description
boolean

true if the data label displays the series name; otherwise, false.

getShowValue() Method

Returns whether the data label displays the data point value.

Declaration

public boolean getShowValue()

Returns

Type Description
boolean

true if the data label displays the data point value; otherwise, false.

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

true to hide the data label; otherwise, false.

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

true to display the category name; otherwise, false.

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

true to display text from a cell range; otherwise, false.

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

true to display the legend key; otherwise, false.

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

true to display the series name; otherwise, false.

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

true to display the data point value; otherwise, false.

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.