`` `` custom element class used in XY and bubble charts, and perhaps others.
| 75 | |
| 76 | |
| 77 | class CT_NumDataSource(BaseOxmlElement): |
| 78 | """ |
| 79 | ``<c:yVal>`` custom element class used in XY and bubble charts, and |
| 80 | perhaps others. |
| 81 | """ |
| 82 | |
| 83 | numRef = OneAndOnlyOne("c:numRef") |
| 84 | |
| 85 | @property |
| 86 | def ptCount_val(self): |
| 87 | """ |
| 88 | Return the value of `./c:numRef/c:numCache/c:ptCount/@val`, |
| 89 | specifying how many `c:pt` elements are in this numeric data cache. |
| 90 | Returns 0 if no `c:ptCount` element is present, as this is the least |
| 91 | disruptive way to degrade when no cached point data is available. |
| 92 | This situation is not expected, but is valid according to the schema. |
| 93 | """ |
| 94 | results = self.xpath(".//c:ptCount/@val") |
| 95 | return int(results[0]) if results else 0 |
| 96 | |
| 97 | def pt_v(self, idx): |
| 98 | """ |
| 99 | Return the Y value for data point *idx* in this cache, or None if no |
| 100 | value is present for that data point. |
| 101 | """ |
| 102 | results = self.xpath(".//c:pt[@idx=%d]" % idx) |
| 103 | return results[0].value if results else None |
| 104 | |
| 105 | |
| 106 | class CT_SeriesComposite(BaseOxmlElement): |
nothing calls this directly
no test coverage detected
searching dependent graphs…