Skip to main content

StockDataLabel Class

Contains settings for a data label in a stock chart.

Declaration

public class StockDataLabel extends DataLabel

Remarks

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

Call the setLabelPosition(StockDataLabelPosition value) method to specify the label position relative to the data point.

Pass a StockDataLabel object to the IStockDataLabels.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
JavaObject
See Also

StockDataLabel()

Initializes a new instance of the StockDataLabel class.

Declaration

public StockDataLabel()

Methods

deepClone() Method

Returns a deep copy of this StockDataLabel instance.

Declaration

public StockDataLabel deepClone()

Returns

Type Description
StockDataLabel

A deep copy of this StockDataLabel.

getLabelPosition() Method

Returns the data label position relative to the data point.

Declaration

public StockDataLabelPosition getLabelPosition()

Returns

Type Description
StockDataLabelPosition

The data label position.

setLabelPosition(StockDataLabelPosition value) Method

Sets the data label position relative to the data point.

Declaration

public void setLabelPosition(StockDataLabelPosition value)

Parameters

Name Type Description
value StockDataLabelPosition

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
LEFT Indicates that the data label is to the left of the data point.
TOP Indicates that the data label is above the data point.
RIGHT Indicates that the data label is to the right of the data point.
BOTTOM Indicates that the data label is below the data point.
CENTER Indicates that the data label is centered on the data point.
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 StockDataLabelPosition.DEFAULT for a new data label and the value from the document for a loaded data label.