Skip to main content

BarDataLabel Class

Contains settings for a data label in a bar chart.

Declaration

public class BarDataLabel extends DataLabel

Remarks

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

Call the setLabelPosition(BarDataLabelPosition value) method to specify the label position relative to the bar.

Pass a BarDataLabel object to the IBarDataLabels.setLabel(key, value) method to format the data label of an individual data point.

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

BarDataLabel()

Initializes a new instance of the BarDataLabel class.

Declaration

public BarDataLabel()

Methods

deepClone() Method

Returns a deep copy of this BarDataLabel instance.

Declaration

public BarDataLabel deepClone()

Returns

Type Description
BarDataLabel

A deep copy of this BarDataLabel.

getLabelPosition() Method

Returns the data label position relative to the bar.

Declaration

public BarDataLabelPosition getLabelPosition()

Returns

Type Description
BarDataLabelPosition

The data label position.

setLabelPosition(BarDataLabelPosition value) Method

Sets the data label position relative to the bar.

Declaration

public void setLabelPosition(BarDataLabelPosition value)

Parameters

Name Type Description
value BarDataLabelPosition

The data label position.

Exceptions

Type Description
NullPointerException

Thrown if the value parameter is null.

Remarks

The setLabelPosition(value) method accepts the following values:

Value Description
CENTER Indicates that the data label is in the center of the bar.
INSIDE_BASE Indicates that the data label is inside the bar at the bar base.
INSIDE_END Indicates that the data label is inside the bar at the bar end.
OUTSIDE_END Indicates that the data label is outside the bar beyond the bar end.
DEFAULT Indicates that the data label position is not specified, and the chart application uses the default position.

If you do not call the setLabelPosition(value) method, the API uses BarDataLabelPosition.DEFAULT for a new data label and the value from the document for a loaded data label.