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

Method add_series

src/pptx/chart/data.py:282–294  ·  view source on GitHub ↗

Add a series to this data set entitled *name* and having the data points specified by *values*, an iterable of numeric values. *number_format* specifies how the series values will be displayed, and may be a string, e.g. '#,##0' corresponding to an Excel number

(self, name, values=(), number_format=None)

Source from the content-addressed store, hash-verified

280 return self.categories.add_category(label)
281
282 def add_series(self, name, values=(), number_format=None):
283 """
284 Add a series to this data set entitled *name* and having the data
285 points specified by *values*, an iterable of numeric values.
286 *number_format* specifies how the series values will be displayed,
287 and may be a string, e.g. '#,##0' corresponding to an Excel number
288 format.
289 """
290 series_data = CategorySeriesData(self, name, number_format)
291 self.append(series_data)
292 for value in values:
293 series_data.add_data_point(value)
294 return series_data
295
296 @property
297 def categories(self):

Calls 3

add_data_pointMethod · 0.95
CategorySeriesDataClass · 0.85
appendMethod · 0.45