Package io.keikai.model.impl.chart
Class DataLabelsInfo
java.lang.Object
io.keikai.model.impl.chart.DataLabelsInfo
- All Implemented Interfaces:
Serializable
What a series' data labels say, as its OOXML
<c:dLbls> declares it.
AbstractSeriesAdv.isDataLabelsVisible() answers only whether labels
are drawn — the OR of the five show* flags. That is enough to switch
them on and nothing more, which leaves the renderer to invent their content:
Highcharts' default for a pie series is the category name, so a doughnut
declaring <c:showPercent val="1"/> drew "Transportation" where Excel
draws "89%". This carries the declaration itself so the label text can be
composed from it.
Immutable, and Serializable because it hangs off SeriesImpl,
which a clustered session serializes with the rest of the book.
- Since:
- 7.0.0
- See Also:
-
- ECMA-376 Part 1 §21.2.2.49 (dLbls), §21.2.2.48 (dLblPos), §21.2.2.79 (numFmt)
- Serialized Form
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDataLabelsInfo(boolean showValue, boolean showCategoryName, boolean showSeriesName, boolean showPercent, boolean showLegendKey, String position, String numberFormat) -
Method Summary
Modifier and TypeMethodDescriptionThe declared number-format code, or null to inherit the value axis'.The declared label position, or null for the chart type's default.booleanWhether the label shows the point's category name.booleanWhether the label shows the legend swatch beside its text.booleanWhether the label shows the point's share of the series total.booleanWhether the label shows the series name.booleanWhether the label shows the point's value.booleanWhether any of theshow*flags is set, i.e.
-
Field Details
-
POSITION_OUTSIDE_END
<c:dLblPos val="outEnd"/>— outside the plotted shape. The only position that keeps a pie label out of its slice; ECMA-376 does not permit<c:dLblPos>on a doughnut series at all, so a doughnut never carries it.- See Also:
-
POSITION_CENTER
<c:dLblPos val="ctr"/>— centred in the plotted shape.- See Also:
-
-
Constructor Details
-
DataLabelsInfo
public DataLabelsInfo(boolean showValue, boolean showCategoryName, boolean showSeriesName, boolean showPercent, boolean showLegendKey, String position, String numberFormat) - Parameters:
showValue-<c:showVal>showCategoryName-<c:showCatName>showSeriesName-<c:showSerName>showPercent-<c:showPercent>showLegendKey-<c:showLegendKey>position-<c:dLblPos val="..."/>, or null for the chart type's defaultnumberFormat-<c:numFmt formatCode="..."/>, or null to inherit the value axis' format
-
-
Method Details
-
isShowValue
public boolean isShowValue()Whether the label shows the point's value. -
isShowCategoryName
public boolean isShowCategoryName()Whether the label shows the point's category name. -
isShowSeriesName
public boolean isShowSeriesName()Whether the label shows the series name. -
isShowPercent
public boolean isShowPercent()Whether the label shows the point's share of the series total. -
isShowLegendKey
public boolean isShowLegendKey()Whether the label shows the legend swatch beside its text. -
getPosition
The declared label position, or null for the chart type's default.- See Also:
-
getNumberFormat
The declared number-format code, or null to inherit the value axis'. -
isVisible
public boolean isVisible()Whether any of theshow*flags is set, i.e. labels are drawn.
-