MCPcopy Create free account
hub / github.com/scanny/python-pptx / CT_SeriesComposite

Class CT_SeriesComposite

src/pptx/oxml/chart/series.py:106–237  ·  view source on GitHub ↗

`` `` custom element class. Note there are several different series element types in the schema, such as ``CT_LineSer`` and ``CT_BarSer``, but they all share the same tag name. This class acts as a composite and depends on the caller not to do anything invalid for a series bel

Source from the content-addressed store, hash-verified

104
105
106class CT_SeriesComposite(BaseOxmlElement):
107 """
108 ``<c:ser>`` custom element class. Note there are several different series
109 element types in the schema, such as ``CT_LineSer`` and ``CT_BarSer``,
110 but they all share the same tag name. This class acts as a composite and
111 depends on the caller not to do anything invalid for a series belonging
112 to a particular plot type.
113 """
114
115 _tag_seq = (
116 "c:idx",
117 "c:order",
118 "c:tx",
119 "c:spPr",
120 "c:invertIfNegative",
121 "c:pictureOptions",
122 "c:marker",
123 "c:explosion",
124 "c:dPt",
125 "c:dLbls",
126 "c:trendline",
127 "c:errBars",
128 "c:cat",
129 "c:val",
130 "c:xVal",
131 "c:yVal",
132 "c:shape",
133 "c:smooth",
134 "c:bubbleSize",
135 "c:bubble3D",
136 "c:extLst",
137 )
138 idx = OneAndOnlyOne("c:idx")
139 order = OneAndOnlyOne("c:order")
140 tx = ZeroOrOne("c:tx", successors=_tag_seq[3:])
141 spPr = ZeroOrOne("c:spPr", successors=_tag_seq[4:])
142 invertIfNegative = ZeroOrOne("c:invertIfNegative", successors=_tag_seq[5:])
143 marker = ZeroOrOne("c:marker", successors=_tag_seq[7:])
144 dPt = ZeroOrMore("c:dPt", successors=_tag_seq[9:])
145 dLbls = ZeroOrOne("c:dLbls", successors=_tag_seq[10:])
146 cat = ZeroOrOne("c:cat", successors=_tag_seq[13:])
147 val = ZeroOrOne("c:val", successors=_tag_seq[14:])
148 xVal = ZeroOrOne("c:xVal", successors=_tag_seq[15:])
149 yVal = ZeroOrOne("c:yVal", successors=_tag_seq[16:])
150 smooth = ZeroOrOne("c:smooth", successors=_tag_seq[18:])
151 bubbleSize = ZeroOrOne("c:bubbleSize", successors=_tag_seq[19:])
152 del _tag_seq
153
154 @property
155 def bubbleSize_ptCount_val(self):
156 """
157 Return the number of bubble size values as reflected in the `val`
158 attribute of `./c:bubbleSize//c:ptCount`, or 0 if not present.
159 """
160 vals = self.xpath("./c:bubbleSize//c:ptCount/@val")
161 if not vals:
162 return 0
163 return int(vals[0])

Callers

nothing calls this directly

Calls 3

OneAndOnlyOneClass · 0.90
ZeroOrOneClass · 0.90
ZeroOrMoreClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…