ooodev.format.inner.partial.chart2.series.data_labels.data_labels.chart2_data_label_percent_format_partial module

class ooodev.format.inner.partial.chart2.series.data_labels.data_labels.chart2_data_label_percent_format_partial.Chart2DataLabelPercentFormatPartial(component)[source]

Bases: object

Partial class for Chart2 Data Labels Percent Format.

Parameters:

component (Any) –

__init__(component)[source]
Parameters:

component (Any) –

Return type:

None

style_numbers_percent(*, source_format=True, num_format=0, num_format_index=-1, lang_locale=None)[source]

Style Chart2 Data Series Text Attributes.

Parameters:
  • chart_doc (XChartDocument) – Chart document.

  • source_format (bool, optional) – Specifies whether the number format should be linked to the source format. Defaults to True.

  • num_format (NumberFormatEnum, int, optional) – specifies the number format. Defaults to 0.

  • num_format_index (NumberFormatIndexEnum | int, optional) – Specifies the number format index. Defaults to -1.

  • lang_locale (Locale, optional) – Specifies the language locale. Defaults to None.

Raises:

CancelEventError – If the event before_style_chart2_data_label_format_percent is cancelled and not handled.

Returns:

Percent Format Style instance or None if cancelled.

Return type:

PercentFormat | None

Hint

  • NumberFormatEnum can be imported from ooo.dyn.util.number_format

  • NumberFormatIndexEnum can be imported from ooo.dyn.i18n.number_format_index

  • PercentFormat can be imported from ooodev.format.inner.direct.chart2.series.data_labels.data_labels.percent_format

style_numbers_percent_get()[source]

Gets the number percent Style.

Raises:

CancelEventError – If the event before_style_chart2_data_label_format_percent_get is cancelled and not handled.

Returns:

Number percent style or None if cancelled.

Return type:

PercentFormat | None