scanny / python-pptx

Create Open XML PowerPoint documents in Python
MIT License
2.35k stars 510 forks source link

Working example of adding a Chart #827

Open realtonyyoung opened 2 years ago

realtonyyoung commented 2 years ago

Hello,

I'm struggling with adding a chart into a PPTX. I have tried all manner of examples in the docs and searched StackOverflow, etc. but no dice. I keep getting AttributeError: 'SlidePlaceholder' object has no attribute 'insert_chart' or some other flavour. Does anyone have this working?

I'm trying to use a Two Content layout to have text on one side, and a chart on the other if that's helpful

mszbot commented 2 years ago

This is more a question for stackoverflow. Also, you should share your code snippet so we can see what you are doing wrong.