Skip to main content

DataLabel Class

Contains settings for a data label in a standard chart.

Declaration

public abstract class DataLabel extends DataLabelBase

Remarks

DataLabel is the base class for data labels of individual data points in standard charts. The following classes derive from the DataLabel class:

The DataLabel class inherits label content and formatting settings from the DataLabelBase class (for example, DataLabel.setShowValue(value) and DataLabel.setNumberFormat(value) methods).

setCustomText(TextArea value) and setTextReference(IChartDataReference value) methods replace label content with custom text or text from a chart data reference.

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.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
See Also

DataLabel()

Initializes a new instance of the DataLabel class.

Declaration

public DataLabel()

Methods

deepClone() Method

Returns a deep copy of this DataLabel instance.

Declaration

public DataLabel deepClone()

Returns

Type Description
DataLabel

A deep copy of this DataLabel.

getCustomText() Method

Returns custom text of the data label.

Declaration

public TextArea getCustomText()

Returns

Type Description
TextArea

Custom text of the data label.

getLayout() Method

Returns layout settings for the data label.

Declaration

public LayoutOptions getLayout()

Returns

Type Description
LayoutOptions

Layout settings.

getTextReference() Method

Returns a chart data reference to the data label text.

Declaration

public IChartDataReference getTextReference()

Returns

Type Description
IChartDataReference

A reference to the data label text.

setCustomText(TextArea value) Method

Sets custom text of the data label.

Declaration

public void setCustomText(TextArea value)

Parameters

Name Type Description
value TextArea

Custom text of the data label.

Remarks

If you pass a text area, the API clears the reference that the getTextReference() method returns.

setLayout(LayoutOptions value) Method

Sets layout settings for the data label.

Declaration

public void setLayout(LayoutOptions value)

Parameters

Name Type Description
value LayoutOptions

Layout settings.

setTextReference(IChartDataReference value) Method

Sets a chart data reference to the data label text.

Declaration

public void setTextReference(IChartDataReference value)

Parameters

Name Type Description
value IChartDataReference

A reference to the data label text.

Remarks

If you pass a reference, the API clears the custom text that the getCustomText() method returns.