DataLabel

Inheritance: java.lang.Object

All Implemented Interfaces: com.aspose.slides.IDataLabel, com.aspose.slides.IDOMObject

public class DataLabel implements IDataLabel, IDOMObject

Represents a series labels.

Constructors

Constructor Description
DataLabel(IChartDataPoint parentImmediate) Creates a new instance of DataLabel class.

Methods

Method Description
getParent_Immediate()
getChart() Returns the parent chart.
isVisible() False means that data label is not visible (and so all Show*-flags (ShowValue, …) are false).
hide() Make data label hidden by setting all Show*-flags (ShowValue, …) to false state.
getActualLabelText() Returns actual label text based on DataLabelFormat settings or TextFrameForOverriding.Text value.
addTextFrameForOverriding(String text) Initialize TextFrameForOverriding with the text in paramener “text”.
getTextFrameForOverriding() Can contain a rich formatted text.
getTextFormat() Returns text format.
getX() Returns or sets the x coordinate of a title as a fraction of the width of the chart.
setX(float value) Returns or sets the x coordinate of a title as a fraction of the width of the chart.
getY() Returns or sets the y coordinate of a title as a fraction of the height of the chart.
setY(float value) Returns or sets the y coordinate of a title as a fraction of the height of the chart.
getWidth() Returns or sets the width of a title as a fraction of the width of the chart.
setWidth(float value) Returns or sets the width of a title as a fraction of the width of the chart.
getHeight() Returns or sets the height of a title as a fraction of the height of the chart.
setHeight(float value) Returns or sets the height of a title as a fraction of the height of the chart.
getRight() Right.
getBottom() Bottom.
getDataLabelFormat() Returns data label format.
getValueFromCell() Gets or sets workbook data cell.
setValueFromCell(IChartDataCell value) Gets or sets workbook data cell.
getActualX() Specifies actual x location (left) of the chart element relative to the left top corner of the chart.
getActualY() Specifies actual top of the chart element relative to the left top corner of the chart.
getActualWidth() Specifies actual width of the chart element.
getActualHeight() Specifies actual height of the chart element.
getSlide() Returns the parent slide of a FillFormat.
getPresentation() Returns the parent presentation of a FillFormat.

DataLabel(IChartDataPoint parentImmediate)

public DataLabel(IChartDataPoint parentImmediate)

Creates a new instance of DataLabel class.

Parameters:

Parameter Type Description
parentImmediate IChartDataPoint Parent ChartDataPoint.

getParent_Immediate()

public final IDOMObject getParent_Immediate()

Returns Parent_Immediate object. Read-only IDOMObject.

Returns: com.aspose.slides.IDOMObject

getChart()

public final IChart getChart()

Returns the parent chart. Read-only IChart.

Returns: IChart

isVisible()

public final boolean isVisible()

False means that data label is not visible (and so all Show*-flags (ShowValue, …) are false). Read-only boolean .


If data label is visible you can make it hidden with Hide() method. But if data label is not visible (IsVisible is false) you can make data label visible with setting Show*-flags (ShowValue, …) to true state.

Returns: boolean

hide()

public final void hide()

Make data label hidden by setting all Show*-flags (ShowValue, …) to false state. IsVisible will be false after this.


If data label is not visible (IsVisible is false) you can make data label visible with setting Show*-flags (ShowValue, …) to true state.

getActualLabelText()

public final String getActualLabelText()

Returns actual label text based on DataLabelFormat settings or TextFrameForOverriding.Text value.

Returns: java.lang.String - The java.lang.String object.

addTextFrameForOverriding(String text)

public final ITextFrame addTextFrameForOverriding(String text)

Initialize TextFrameForOverriding with the text in paramener “text”. If TextFrameForOverriding is already initialized then simply changes its text.

Parameters:

Parameter Type Description
text java.lang.String Text for a new TextFrameForOverriding.

Returns: ITextFrame

getTextFrameForOverriding()

public final ITextFrame getTextFrameForOverriding()

Can contain a rich formatted text. If this property is not null then this formatted text value overrides auto-generated text of data label. Auto-generated text of data label means text that is managed by ShowSeriesName, ShowValue, … properties and is formatted with the TextFormatManager.TextFormat property. Read-only ITextFrame.

Returns: ITextFrame

getTextFormat()

public final IChartTextFormat getTextFormat()

Returns text format. Read-only IChartTextFormat.

Returns: IChartTextFormat

getX()

public final float getX()

Returns or sets the x coordinate of a title as a fraction of the width of the chart. Read/write float .

Returns: float

setX(float value)

public final void setX(float value)

Returns or sets the x coordinate of a title as a fraction of the width of the chart. Read/write float .

Parameters:

Parameter Type Description
value float

getY()

public final float getY()

Returns or sets the y coordinate of a title as a fraction of the height of the chart. Read/write float .

Returns: float

setY(float value)

public final void setY(float value)

Returns or sets the y coordinate of a title as a fraction of the height of the chart. Read/write float .

Parameters:

Parameter Type Description
value float

getWidth()

public final float getWidth()

Returns or sets the width of a title as a fraction of the width of the chart. Read/write float .

Returns: float

setWidth(float value)

public final void setWidth(float value)

Returns or sets the width of a title as a fraction of the width of the chart. Read/write float .

Parameters:

Parameter Type Description
value float

getHeight()

public final float getHeight()

Returns or sets the height of a title as a fraction of the height of the chart. Read/write float .

Returns: float

setHeight(float value)

public final void setHeight(float value)

Returns or sets the height of a title as a fraction of the height of the chart. Read/write float .

Parameters:

Parameter Type Description
value float

getRight()

public final float getRight()

Right. Read-only float .

Returns: float

getBottom()

public final float getBottom()

Bottom. Read-only float .

Returns: float

getDataLabelFormat()

public final IDataLabelFormat getDataLabelFormat()

Returns data label format. Read-only IDataLabelFormat.

Returns: IDataLabelFormat

getValueFromCell()

public final IChartDataCell getValueFromCell()

Gets or sets workbook data cell. Applied if IDataLabelFormat.ShowLabelValueFromCell property equals true.

Returns: IChartDataCell

setValueFromCell(IChartDataCell value)

public final void setValueFromCell(IChartDataCell value)

Gets or sets workbook data cell. Applied if IDataLabelFormat.ShowLabelValueFromCell property equals true.

Parameters:

Parameter Type Description
value IChartDataCell

getActualX()

public final float getActualX()

Specifies actual x location (left) of the chart element relative to the left top corner of the chart. Call method IChart.ValidateChartLayout() before to get actual values. Read float .

Returns: float

getActualY()

public final float getActualY()

Specifies actual top of the chart element relative to the left top corner of the chart. Call method IChart.ValidateChartLayout() before to get actual values. Read float .

Returns: float

getActualWidth()

public final float getActualWidth()

Specifies actual width of the chart element. Call method IChart.ValidateChartLayout() before to get actual values. Read float .

Returns: float

getActualHeight()

public final float getActualHeight()

Specifies actual height of the chart element. Call method IChart.ValidateChartLayout() before to get actual values. Read float .

Returns: float

getSlide()

public final IBaseSlide getSlide()

Returns the parent slide of a FillFormat. Read-only BaseSlide.

Returns: IBaseSlide

getPresentation()

public final IPresentation getPresentation()

Returns the parent presentation of a FillFormat. Read-only IPresentation.

Returns: IPresentation