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

Method add_category

src/pptx/chart/data.py:271–280  ·  view source on GitHub ↗

Return a newly created |data.Category| object having *label* and appended to the end of the category collection for this chart. *label* can be a string, a number, a datetime.date, or datetime.datetime object. All category labels in a chart must be the same ty

(self, label)

Source from the content-addressed store, hash-verified

269 """
270
271 def add_category(self, label):
272 """
273 Return a newly created |data.Category| object having *label* and
274 appended to the end of the category collection for this chart.
275 *label* can be a string, a number, a datetime.date, or
276 datetime.datetime object. All category labels in a chart must be the
277 same type. All category labels in a chart having multi-level
278 categories must be strings.
279 """
280 return self.categories.add_category(label)
281
282 def add_series(self, name, values=(), number_format=None):
283 """

Calls 1

add_categoryMethod · 0.45