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

Method categories

src/pptx/chart/data.py:297–309  ·  view source on GitHub ↗

|data.Categories| object providing access to category-object hierarchy. Assigning an iterable of category labels (strings, numbers, or dates) replaces the |data.Categories| object with a new one containing a category for each label in the sequence. Creating a chart

(self)

Source from the content-addressed store, hash-verified

295
296 @property
297 def categories(self):
298 """|data.Categories| object providing access to category-object hierarchy.
299
300 Assigning an iterable of category labels (strings, numbers, or dates) replaces
301 the |data.Categories| object with a new one containing a category for each label
302 in the sequence.
303
304 Creating a chart from chart data having date categories will cause the chart to
305 have a |DateAxis| for its category axis.
306 """
307 if not getattr(self, "_categories", False):
308 self._categories = Categories()
309 return self._categories
310
311 @categories.setter
312 def categories(self, category_labels):

Callers

nothing calls this directly

Calls 2

add_categoryMethod · 0.95
CategoriesClass · 0.70

Tested by

no test coverage detected