IPieDataLabels Interface
Contains data label settings for a pie series or pie chart view.
Declaration
public interface IPieDataLabels extends IDataLabels
Remarks
Call the PieSeries.getDataLabels() method to access data label settings for a pie, 3D pie, pie of pie, or bar of pie series. Call one of the following methods to access data label settings for all series in a chart view:
Refer to the following help topic for additional information: Customize Chart Data Labels — Presentation API for Java.
Implements
Methods
getLabel(int key) Method
Returns settings for the data label of the specified data point.
Declaration
public abstract PieDataLabel getLabel(int key)
Parameters
| Name | Type | Description |
|---|---|---|
| key | int | The zero-based index of the data point. |
Returns
| Type | Description |
|---|---|
| PieDataLabel | Data label settings, or |
getLabelPosition() Method
Returns the position of data labels relative to pie slices.
Declaration
public abstract PieDataLabelPosition getLabelPosition()
Returns
| Type | Description |
|---|---|
| PieDataLabelPosition | The data label position. |
getShowPercent() Method
Returns whether data labels display percentage values.
Declaration
public abstract boolean getShowPercent()
Returns
| Type | Description |
|---|---|
| boolean |
|
setLabel(int key, PieDataLabel value) Method
Sets settings for the data label of the specified data point.
Declaration
public abstract void setLabel(int key, PieDataLabel value)
Parameters
| Name | Type | Description |
|---|---|---|
| key | int | The zero-based index of the data point. |
| value | PieDataLabel | Data label settings. |
Exceptions
| Type | Description |
|---|---|
| ArgumentNullException | Thrown if the |
Remarks
Pass a PieDataLabel object to the setLabel(key, value) method to format the data label of an individual data point.
To remove individual data label settings, call the remove(key) method of the IPieDataLabels object.
setLabelPosition(PieDataLabelPosition value) Method
Sets the position of data labels relative to pie slices.
Declaration
public abstract void setLabelPosition(PieDataLabelPosition value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | PieDataLabelPosition | 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 pie slice. |
| BEST_FIT | Indicates that the chart application chooses the best data label position. |
| INSIDE_END | Indicates that the data label is inside the pie slice at the outer edge. |
| OUTSIDE_END | Indicates that the data label is outside the pie slice beyond the outer edge. |
| 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 PieDataLabelPosition.DEFAULT.
Call the PieDataLabel.setLabelPosition(value) method to specify the position of an individual data label.
setShowPercent(boolean value) Method
Sets whether data labels display percentage values.
Declaration
public abstract void setShowPercent(boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | boolean |
|
Remarks
If you do not call the setShowPercent(value) method, the API uses false.
Call the PieDataLabel.setShowPercent(value) method to specify whether an individual data label displays the percentage value.