Paper Office
paper-pptxAPI referencechart.category

Categories

paper-pptx 0.2.0 API reference

A sequence of category.Category objects, each representing a category label on the chart. Provides properties for dealing with hierarchical categories.

Categories(xChart)

Attributes

depth

attributedepth

Return an integer representing the number of hierarchical levels in this category collection. Returns 1 for non-hierarchical categories and 0 if no categories are present (generally meaning no series are present).

flattened_labels

attributeflattened_labels

Return a sequence of tuples, each containing the flattened hierarchy of category labels for a leaf category. Each tuple is in parent -> child order, e.g. ('US', 'CA', 'San Francisco'), with the leaf category appearing last. If this categories collection is non-hierarchical, each tuple will contain only a leaf category label. If the plot has no series (and therefore no categories), an empty tuple is returned.

levels

attributelevels

Return a sequence of CategoryLevel objects representing the hierarchy of this category collection. The sequence is empty when the category collection is not hierarchical, that is, contains only leaf-level categories. The levels are ordered from the leaf level to the root level; so the first level will contain the same categories as this category collection.

Functions

__getitem__

func__getitem__(idx)
paramidx

__iter__

func__iter__()

__len__

func__len__()

On this page