Legend

Inheritance: java.lang.Object, com.aspose.slides.DomObject

All Implemented Interfaces: com.aspose.slides.ILegend

public class Legend extends DomObject<Chart> implements ILegend

Represents chart’s legend properties.

Methods

MethodDescription
getX()Returns or sets the x coordinate of a legend as a fraction of the width of the chart.
setX(float value)Returns or sets the x coordinate of a legend as a fraction of the width of the chart.
getY()Returns or sets the y coordinate of a legend as a fraction of the height of the chart.
setY(float value)Returns or sets the y coordinate of a legend as a fraction of the height of the chart.
getWidth()Returns or sets the width of a legend as a fraction of the width of the chart.
setWidth(float value)Returns or sets the width of a legend as a fraction of the width of the chart.
getHeight()Returns or sets the height of a legend as a fraction of the height of the chart.
setHeight(float value)Returns or sets the height of a legend as a fraction of the height of the chart.
getRight()Right.
getBottom()Bottom.
getOverlay()Determines whether other chart elements shall be allowed to overlap legend.
setOverlay(boolean value)Determines whether other chart elements shall be allowed to overlap legend.
getTextFormat()Text format.
getPosition()Specifies the position of the legend on a chart.
setPosition(int value)Specifies the position of the legend on a chart.
getFormat()Returns the format of a legend.
getChart()Returns the chart.
getEntries()Gets legend entries.
getSlide()Returns the parent slide of a FillFormat.
getPresentation()Returns the parent presentation of a FillFormat.

getX()

public final float getX()

Returns or sets the x coordinate of a legend 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 legend as a fraction of the width of the chart. Read/write float.

Parameters:

ParameterTypeDescription
valuefloat

getY()

public final float getY()

Returns or sets the y coordinate of a legend 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 legend as a fraction of the height of the chart. Read/write float.

Parameters:

ParameterTypeDescription
valuefloat

getWidth()

public final float getWidth()

Returns or sets the width of a legend 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 legend as a fraction of the width of the chart. Read/write float.

Parameters:

ParameterTypeDescription
valuefloat

getHeight()

public final float getHeight()

Returns or sets the height of a legend 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 legend as a fraction of the height of the chart. Read/write float.

Parameters:

ParameterTypeDescription
valuefloat

getRight()

public final float getRight()

Right. Read-only float.

Returns: float

getBottom()

public final float getBottom()

Bottom. Read-only float.

Returns: float

getOverlay()

public final boolean getOverlay()

Determines whether other chart elements shall be allowed to overlap legend. Read/write boolean.

Returns: boolean

setOverlay(boolean value)

public final void setOverlay(boolean value)

Determines whether other chart elements shall be allowed to overlap legend. Read/write boolean.

Parameters:

ParameterTypeDescription
valueboolean

getTextFormat()

public final IChartTextFormat getTextFormat()

Text format. Read-only IChartTextFormat.

Returns: IChartTextFormat

getPosition()

public final int getPosition()

Specifies the position of the legend on a chart. Non-NaN values of X, Y, Width, Heigt properties override effect of this property. Read/write LegendPositionType.

Returns: int

setPosition(int value)

public final void setPosition(int value)

Specifies the position of the legend on a chart. Non-NaN values of X, Y, Width, Heigt properties override effect of this property. Read/write LegendPositionType.

Parameters:

ParameterTypeDescription
valueint

getFormat()

public final IFormat getFormat()

Returns the format of a legend. Read-only IFormat.

Returns: IFormat

getChart()

public final IChart getChart()

Returns the chart. Read-only IChart.

Returns: IChart

getEntries()

public final ILegendEntryCollection getEntries()

Gets legend entries. Read-only ILegendEntryCollection.

Returns: ILegendEntryCollection

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