python-pptx icon indicating copy to clipboard operation
python-pptx copied to clipboard

Editing individual data labels?

Open mszbot opened this issue 7 months ago • 1 comments

Is it possible to edit individual data labels?

for example, I want to update the two properties below on very specific data labels, not on the entire collection.

series.data_labels.show_value = False series.data_labels.show_series_name = True

Here's what I'm trying to achieve:

Image

mszbot avatar Jun 18 '25 15:06 mszbot

Pretty sure we don't provide direct access to anything like that via the API, but what I would do is work out how PowerPoint does it with the XML and then look in the code and see if we provide any access to that.

Nice thing about that approach is it gives you a big head start if you end up manipulating the XML directly to get it done.

Otherwise it's possible you can do things like set the font of an individual data label to white or something, but I'm pretty sure that's not how PowerPoint does it.

scanny avatar Jun 18 '25 17:06 scanny