public class DataLabels
Example:
//Set the DataLabels in the chart
DataLabels datalabels;
for (int i = 0; i < chart.getNSeries().getCount(); i++)
{
datalabels = chart.getNSeries().get(i).getDataLabels();
//Set the position of DataLabels
datalabels.setPosition(LabelPositionType.INSIDE_BASE);
//Show the category name in the DataLabels
datalabels.setShowCategoryName(true);
//Show the value in the DataLabels
datalabels.setShowValue(true);
//Not show the percentage in the DataLabels
datalabels.setShowPercentage(false);
//Not show the legend key.
datalabels.setShowLegendKey(false);
}
Property Getters/Setters Summary | ||
---|---|---|
Area | getArea() | |
Gets the |
||
boolean | getAutoScaleFont() | |
void | setAutoScaleFont(booleanvalue) | |
True if the text in the object changes font size when the object size changes. The default value is True. | ||
int | getBackground() | |
void | setBackground(intvalue) | |
Gets and sets the display mode of the background The value of the property is BackgroundMode integer constant. | ||
int | getBackgroundMode() | |
void | setBackgroundMode(intvalue) | |
Gets and sets the display mode of the background The value of the property is BackgroundMode integer constant. | ||
Line | getBorder() | |
Gets the |
||
Chart | getChart() | |
int | getDefaultHeight() | |
Represents height of default position
|
||
int | getDefaultWidth() | |
Represents width of default position
|
||
int | getDefaultX() | |
Represents x of default position
|
||
int | getDefaultY() | |
Represents y of default position
|
||
Font | getFont() | |
Gets the font of the DataLabels;
|
||
int | getHeight() | |
void | setHeight(intvalue) | |
Gets or sets the height of frame in units of 1/4000 of the chart area. | ||
boolean | isAutomaticSize() | |
void | setAutomaticSize(booleanvalue) | |
Indicates whether the chart frame is automatic sized. | ||
boolean | isAutoText() | |
void | setAutoText(booleanvalue) | |
Indicates the text is auto generated. | ||
boolean | isDefaultPosBeSet() | |
Indicates whether default position(DefaultX, DefaultY, DefaultWidth and DefaultHeight) are set.
|
||
boolean | isDeleted() | |
void | setDeleted(booleanvalue) | |
Indicates whether this data lables is deleted. | ||
boolean | isInnerMode() | |
void | setInnerMode(booleanvalue) | |
Indicates whether the size of the plot area size includes the tick marks, and the axis labels. False specifies that the size shall determine the size of the plot area, the tick marks, and the axis labels. | ||
boolean | isResizeShapeToFitText() | |
void | setResizeShapeToFitText(booleanvalue) | |
Gets or sets whether a shape should be auto-fit to fully contain the text described within it. Auto-fitting is when text within a shape is scaled in order to contain all the text inside. | ||
boolean | isTextWrapped() | |
void | setTextWrapped(booleanvalue) | |
Gets or sets a value indicating whether the text is wrapped. | ||
java.lang.String | getLinkedSource() | |
void | setLinkedSource(java.lang.Stringvalue) | |
Gets and sets a reference to the worksheet. | ||
int | getNumber() | |
void | setNumber(intvalue) | |
Gets ans sets the built-in _number format. | ||
java.lang.String | getNumberFormat() | |
void | setNumberFormat(java.lang.Stringvalue) | |
Represents the format string for the DataLabels object. | ||
boolean | getNumberFormatLinked() | |
void | setNumberFormatLinked(booleanvalue) | |
True if the _number format is linked to the cells (so that the _number format changes in the labels when it changes in the cells). | ||
int | getPosition() | |
void | setPosition(intvalue) | |
Represents the position of the data lable. The value of the property is LabelPositionType integer constant. | ||
int | getRotationAngle() | |
void | setRotationAngle(intvalue) | |
Represents text rotation angle. | ||
int | getSeparator() | |
void | setSeparator(intvalue) | |
Sets or returns the _separator type used for the data labels on a chart. The value of the property is DataLablesSeparatorType integer constant. | ||
java.lang.String | getSeparatorValue() | |
void | setSeparatorValue(java.lang.Stringvalue) | |
Sets or returns the _separator value used for the data labels on a chart. | ||
boolean | getShadow() | |
void | setShadow(booleanvalue) | |
True if the frame has a shadow. | ||
ShapePropertyCollection | getShapeProperties() | |
Gets the |
||
int | getShapeType() | |
void | setShapeType(intvalue) | |
Gets or sets shape type of data label. The value of the property is DataLabelShapeType integer constant. | ||
boolean | getShowBubbleSize() | |
void | setShowBubbleSize(booleanvalue) | |
Represents a specified chart's data label percentage value display behavior. True displays the percentage value. False to hide. | ||
boolean | getShowCategoryName() | |
void | setShowCategoryName(booleanvalue) | |
Represents a specified chart's data label category name display behavior.True to display the category name for the data labels on a chart. False to hide. | ||
boolean | getShowCellRange() | |
void | setShowCellRange(booleanvalue) | |
Indicates whether showing cell range as the data labels. | ||
boolean | getShowLegendKey() | |
void | setShowLegendKey(booleanvalue) | |
Represents a specified chart's data label legend key display behavior. True if the data label legend key is visible. | ||
boolean | getShowPercentage() | |
void | setShowPercentage(booleanvalue) | |
Represents a specified chart's data label percentage value display behavior. True displays the percentage value. False to hide. | ||
boolean | getShowSeriesName() | |
void | setShowSeriesName(booleanvalue) | |
Returns or sets a Boolean to indicate the series name display behavior for the data labels on a chart. True to show the series name. False to hide. | ||
boolean | getShowValue() | |
void | setShowValue(booleanvalue) | |
Represents a specified chart's data label values display behavior. True displays the values. False to hide. | ||
java.lang.String | getText() | |
void | setText(java.lang.Stringvalue) | |
Gets or sets the text of a frame's title. | ||
int | getTextDirection() | |
void | setTextDirection(intvalue) | |
Represents text reading order. The value of the property is TextDirectionType integer constant. | ||
Font | getTextFont() | |
Gets a |
||
int | getTextHorizontalAlignment() | |
void | setTextHorizontalAlignment(intvalue) | |
Ges or sets the text horizontal alignment. The value of the property is TextAlignmentType integer constant. | ||
int | getTextVerticalAlignment() | |
void | setTextVerticalAlignment(intvalue) | |
Gets or sets the text vertical alignment of text. The value of the property is TextAlignmentType integer constant. | ||
int | getWidth() | |
void | setWidth(intvalue) | |
Gets or sets the width of frame in units of 1/4000 of the chart area. | ||
int | getX() | |
void | setX(intvalue) | |
Gets or sets the x coordinate of the upper left corner in units of 1/4000 of the chart area. | ||
int | getY() | |
void | setY(intvalue) | |
Gets or sets the y coordinate of the upper left corner in units of 1/4000 of the chart area. |
Method Summary | ||
---|---|---|
FontSetting | characters(int startIndex, int length) | |
Returns a Characters object that represents a range of characters within the text.
|
||
void | setPositionAuto() | |
Set position of the frame to automatic
|
public Area getArea()
public boolean isAutoText() / public void setAutoText(boolean value)
public java.lang.String getText() / public void setText(java.lang.String value)
public boolean isTextWrapped() / public void setTextWrapped(boolean value)
public int getBackgroundMode() / public void setBackgroundMode(int value)
public boolean getShowValue() / public void setShowValue(boolean value)
public boolean getShowCellRange() / public void setShowCellRange(boolean value)
public boolean getShowPercentage() / public void setShowPercentage(boolean value)
public boolean getShowBubbleSize() / public void setShowBubbleSize(boolean value)
public boolean getShowCategoryName() / public void setShowCategoryName(boolean value)
public boolean getShowSeriesName() / public void setShowSeriesName(boolean value)
public boolean getShowLegendKey() / public void setShowLegendKey(boolean value)
public java.lang.String getNumberFormat() / public void setNumberFormat(java.lang.String value)
public int getNumber() / public void setNumber(int value)
public boolean getNumberFormatLinked() / public void setNumberFormatLinked(boolean value)
public Font getFont()
public int getSeparator() / public void setSeparator(int value)
public java.lang.String getSeparatorValue() / public void setSeparatorValue(java.lang.String value)
public int getPosition() / public void setPosition(int value)
public int getShapeType() / public void setShapeType(int value)
public boolean isDeleted() / public void setDeleted(boolean value)
public int getTextHorizontalAlignment() / public void setTextHorizontalAlignment(int value)
public int getTextVerticalAlignment() / public void setTextVerticalAlignment(int value)
public int getRotationAngle() / public void setRotationAngle(int value)
public java.lang.String getLinkedSource() / public void setLinkedSource(java.lang.String value)
public int getTextDirection() / public void setTextDirection(int value)
public boolean isResizeShapeToFitText() / public void setResizeShapeToFitText(boolean value)
public boolean isInnerMode() / public void setInnerMode(boolean value)
public Chart getChart()
public Font getTextFont()
public boolean getAutoScaleFont() / public void setAutoScaleFont(boolean value)
public int getBackground() / public void setBackground(int value)
public boolean isAutomaticSize() / public void setAutomaticSize(boolean value)
public int getX() / public void setX(int value)
public int getY() / public void setY(int value)
public int getHeight() / public void setHeight(int value)
public int getWidth() / public void setWidth(int value)
public boolean getShadow() / public void setShadow(boolean value)
public ShapePropertyCollection getShapeProperties()
public boolean isDefaultPosBeSet()
public int getDefaultX()
public int getDefaultY()
public int getDefaultWidth()
public int getDefaultHeight()
public FontSetting characters(int startIndex, int length)
startIndex
- The index of the start of the character.length
- The number of characters.public void setPositionAuto()