Paper Office
paper-pptxAPI referenceoxml.chart.plot

CT_PieChart

paper-pptx 0.2.0 API reference

<c:pieChart> custom element class

Attributes

cat

attributecat

Return the c:cat element of the first series in this xChart, or None if not present.

cat_pt_count

attributecat_pt_count

Return the value of the c:ptCount descendent of this xChart element. Its parent can be one of three element types. This value represents the true number of (leaf) categories, although they might not all have a corresponding c:pt sibling; a category with no label does not get a c:pt element. Returns 0 if there is no c:ptCount descendent.

cat_pts

attributecat_pts

Return a sequence representing the c:pt elements under the c:cat element of the first series in this xChart element. A category having no value will have no corresponding c:pt element; None will appear in that position in such cases. Items appear in idx order. Only those in the first <c:lvl> element are included in the case of multi-level categories.

dLbls

attributedLbls
= ZeroOrOne('c:dLbls', successors=(_tag_seq[3:]))

grouping_val

attributegrouping_val

Return the value of the ./c:grouping{val=?} attribute, taking defaults into account when items are not present.

ser

attributeser
= ZeroOrMore('c:ser', successors=(_tag_seq[2:]))

sers

attributesers

Sequence of <c:ser> child elements in this xChart in c:order/@val sequence (not document or c:idx order).

varyColors

attributevaryColors
= ZeroOrOne('c:varyColors', successors=(_tag_seq[1:]))

xml

attributexmlstr

XML 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 | None

First child with tag in tagnames, or None if not found.

paramtagnamesstr
= ()

Returns

lxml.etree._Element | None

insert_element_before

funcinsert_element_before(elm: ElementBase, *tagnames: str)
paramelmElementBase
paramtagnamesstr
= ()

iter_sers

funciter_sers()

Generate each <c:ser> child element in this xChart in c:order/@val sequence (not document or c:idx order).

remove_all

funcremove_all(*tagnames: str) -> None

Remove child elements with tagname (e.g. "a:p") in tagnames.

paramtagnamesstr
= ()

Returns

None

xpath

funcxpath(xpath_str: str) -> Any

Override of lxml _Element.xpath() method.

Provides standard Open XML namespace mapping (nsmap) in centralized location.

paramxpath_strstr

Returns

typing.Any

On this page