Class DataLabelsInfo

java.lang.Object
io.keikai.model.impl.chart.DataLabelsInfo
All Implemented Interfaces:
Serializable

public class DataLabelsInfo extends Object implements 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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    <c:dLblPos val="ctr"/> — centred in the plotted shape.
    static final String
    <c:dLblPos val="outEnd"/> — outside the plotted shape.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DataLabelsInfo(boolean showValue, boolean showCategoryName, boolean showSeriesName, boolean showPercent, boolean showLegendKey, String position, String numberFormat)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The declared number-format code, or null to inherit the value axis'.
    The declared label position, or null for the chart type's default.
    boolean
    Whether the label shows the point's category name.
    boolean
    Whether the label shows the legend swatch beside its text.
    boolean
    Whether the label shows the point's share of the series total.
    boolean
    Whether the label shows the series name.
    boolean
    Whether the label shows the point's value.
    boolean
    Whether any of the show* flags is set, i.e.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • POSITION_OUTSIDE_END

      public static final String 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

      public static final String 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 default
      numberFormat - <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

      public String getPosition()
      The declared label position, or null for the chart type's default.
      See Also:
    • getNumberFormat

      public String getNumberFormat()
      The declared number-format code, or null to inherit the value axis'.
    • isVisible

      public boolean isVisible()
      Whether any of the show* flags is set, i.e. labels are drawn.