DataLabels
paper-pptx 0.2.0 API reference
Provides access to properties of data labels for a plot or a series.
This is not a collection and does not provide access to individual data
labels. Access to individual labels is via the Point object. The
properties this object provides control formatting of all the data
labels in its scope.
DataLabels(dLbls)Attributes
font
attributefontThe Font object that provides access to the text properties for
these data labels, such as bold, italic, etc.
number_format
attributenumber_formatRead/write string specifying the format for the numbers on this set
of data labels. Returns 'General' if no number format has been set.
Note that this format string has no effect on rendered data labels
when :meth:number_format_is_linked is True. Assigning a format
string to this property automatically sets
:meth:number_format_is_linked to False.
number_format_is_linked
attributenumber_format_is_linkedRead/write boolean specifying whether number formatting should be
taken from the source spreadsheet rather than the value of
:meth:number_format.
position
attributepositionRead/write :ref:XlDataLabelPosition enumeration value specifying
the position of the data labels with respect to their data point, or
None if no position is specified. Assigning None causes
PowerPoint to choose the default position, which varies by chart
type.
show_category_name
attributeshow_category_nameRead/write. True when name of category should appear in label.
show_legend_key
attributeshow_legend_keyRead/write. True when data label displays legend-color swatch.
show_percentage
attributeshow_percentageRead/write. True when data label displays percentage.
This option is not operative on all chart types. Percentage appears on polar charts such as pie and donut.
show_series_name
attributeshow_series_nameRead/write. True when data label displays series name.
show_value
attributeshow_valueRead/write. True when label displays numeric value of datapoint.