ooodev.adapter.chart2.legend_comp module

class ooodev.adapter.chart2.legend_comp.LegendComp(lo_inst, component=None)[source]

Bases: ComponentBase, FillPropertiesPartial, LinePropertiesPartial, CharacterPropertiesPartial, PropertySetPartial, PropertiesChangeImplement, PropertyChangeImplement, VetoableChangeImplement

Class for managing Chart2 Legend Component.

Parameters:
  • lo_inst (LoInst) –

  • component (Legend | None) –

__init__(lo_inst, component=None)[source]

Constructor

Parameters:
  • lo_inst (LoInst) – Lo Instance. This instance is used to create component is it is not provided.

  • component (Legend, optional) – UNO Chart2 Legend Component.

Return type:

None

property anchor_position: com.sun.star.chart2.LegendPosition.LegendPositionProto

Gets/Sets - Provides an automated position.

Return type:

LegendPositionProto

property component: com.sun.star.chart2.Legend

Legend Component

Return type:

Legend

property expansion: com.sun.star.chart.ChartLegendExpansion.ChartLegendExpansionProto

Gets/Sets how the aspect ratio of the legend should roughly be.

Set the Expansion to com.sun.star.chart.HIGH for a legend that is positioned on the right or left hand side. Use com.sun.star.chart.WIDE for a legend that is positioned on top or the bottom.

Return type:

ChartLegendExpansionProto

property overlay: bool

Gets/Sets whether the legend should overlay the chart.

since

LibreOffice 7.0

Return type:

bool

property reference_page_size: Size | None

Gets/Sets the size of the page at the time when properties were set (e.g. the CharHeight).

This way it is possible to resize objects (like text) in the view without modifying the model.

My be None

Return type:

Size | None

property relative_position: RelativePosition | None

Gets/Sets the position is as a relative position on the page.

If a relative position is given the legend is not automatically placed, but instead is placed relative on the page.

If None, the legend position is solely determined by the anchor_position.

My be None

Return type:

RelativePosition | None

property show: bool

Gets/Sets whether the legend should be rendered by the view.

Return type:

bool