Skip to main content

IDoughnutDataLabels Interface

Contains data label settings for a doughnut series or doughnut chart view.

Declaration

public interface IDoughnutDataLabels extends IDataLabels

Remarks

Call the DoughnutSeries.getDataLabels() method to access data label settings for a doughnut series. Call the DoughnutChartView.getDataLabels() method to access data label settings for all series in a doughnut 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 DoughnutDataLabel getLabel(int key)

Parameters

Name Type Description
key int

The zero-based index of the data point.

Returns

Type Description
DoughnutDataLabel

Data label settings, or null if the data point has no individual data label settings.

getShowPercent() Method

Returns whether data labels display percentage values.

Declaration

public abstract boolean getShowPercent()

Returns

Type Description
boolean

true if data labels display percentage values; otherwise, false.

setLabel(int key, DoughnutDataLabel value) Method

Sets settings for the data label of the specified data point.

Declaration

public abstract void setLabel(int key, DoughnutDataLabel value)

Parameters

Name Type Description
key int

The zero-based index of the data point.

value DoughnutDataLabel

Data label settings.

Exceptions

Type Description
ArgumentNullException

Thrown if the value parameter is null and the series or chart view is in a presentation.

Remarks

Pass a DoughnutDataLabel 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 IDoughnutDataLabels object.

setShowPercent(boolean value) Method

Sets whether data labels display percentage values.

Declaration

public abstract void setShowPercent(boolean value)

Parameters

Name Type Description
value boolean

true to display percentage values; otherwise, false.

Remarks

If you do not call the setShowPercent(value) method, the API uses false.

Call the DoughnutDataLabel.setShowPercent(value) method to specify whether an individual data label displays the percentage value.