CT_DLbl
paper-pptx 0.2.0 API reference
<c:dLbl> element specifying the properties of the data label for an
individual data point.
Attributes
dLblPos
attributedLblPos= ZeroOrOne('c:dLblPos', successors=(_tag_seq[7:]))idx
attributeidx= OneAndOnlyOne('c:idx')idx_val
attributeidx_valThe integer value of the val attribute on the required c:idx
child.
spPr
attributespPr= ZeroOrOne('c:spPr', successors=(_tag_seq[5:]))tx
attributetx= ZeroOrOne('c:tx', successors=(_tag_seq[3:]))txPr
attributetxPr= ZeroOrOne('c:txPr', successors=(_tag_seq[6:]))xml
attributexmlstrXML string for this element, suitable for testing purposes.
Pretty printed for readability and without an XML declaration at the top.
Functions
first_child_found_in
funcfirst_child_found_in(*tagnames: str) -> _Element | NoneFirst child with tag in tagnames, or None if not found.
paramtagnamesstr= ()Returns
lxml.etree._Element | Noneget_or_add_rich
funcget_or_add_rich()Return the c:rich descendant representing the text frame of the
data label, newly created if not present. Any existing c:strRef
element is removed along with its contents.
get_or_add_tx_rich
funcget_or_add_tx_rich()Return the c:tx[c:rich] subtree, newly created if not present.
insert_element_before
funcinsert_element_before(elm: ElementBase, *tagnames: str)paramelmElementBaseparamtagnamesstr= ()new_dLbl
funcnew_dLbl()Return a newly created "loose" c:dLbl element.
The c:dLbl element contains the same (fairly extensive) default
subtree added by PowerPoint when an individual data label is
customized in the UI. Note that the idx value must be set by the
client. Failure to set the idx value will likely result in any
changes not being visible and may result in a repair error on open.
remove_all
funcremove_all(*tagnames: str) -> NoneRemove child elements with tagname (e.g. "a:p") in tagnames.
paramtagnamesstr= ()Returns
Noneremove_tx_rich
funcremove_tx_rich()Remove any c:tx[c:rich] child, or do nothing if not present.
xpath
funcxpath(xpath_str: str) -> AnyOverride of lxml _Element.xpath() method.
Provides standard Open XML namespace mapping (nsmap) in centralized location.
paramxpath_strstrReturns
typing.Any