HistogramDataLabel Class
Contains settings for a data label in a histogram chart.
Declaration
public class HistogramDataLabel extends DataLabelEx
Remarks
The HistogramDataLabel class inherits label content and formatting settings from the DataLabelExBase class (for example, HistogramDataLabel.setShowValue(value) and HistogramDataLabel.setNumberFormat(value) methods).
Call the setLabelPosition(HistogramDataLabelPosition value) method to specify the label position relative to the histogram column.
Pass a HistogramDataLabel object to the IHistogramDataLabels.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
Inheritance
HistogramDataLabel()
Initializes a new instance of the HistogramDataLabel class.
Declaration
public HistogramDataLabel()
Methods
deepClone() Method
Returns a deep copy of this HistogramDataLabel instance.
Declaration
public HistogramDataLabel deepClone()
Returns
| Type | Description |
|---|---|
HistogramDataLabel |
A deep copy of this |
getLabelPosition() Method
Returns the data label position relative to the histogram column.
Declaration
public HistogramDataLabelPosition getLabelPosition()
Returns
| Type | Description |
|---|---|
| HistogramDataLabelPosition | The data label position. |
setLabelPosition(HistogramDataLabelPosition value) Method
Sets the data label position relative to the histogram column.
Declaration
public void setLabelPosition(HistogramDataLabelPosition value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | HistogramDataLabelPosition | The data label position. |
Exceptions
| Type | Description |
|---|---|
| NullPointerException | Thrown if the |
Remarks
The setLabelPosition(value) method accepts the following values:
| Value | Description |
|---|---|
| CENTER | Indicates that the data label is in the center of the histogram column. |
| INSIDE_BASE | Indicates that the data label is inside the histogram column at the column base. |
| INSIDE_END | Indicates that the data label is inside the histogram column at the column end. |
| OUTSIDE_END | Indicates that the data label is outside the histogram column beyond the column 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 HistogramDataLabelPosition.DEFAULT for a new data label and the value from the document for a loaded data label.