I have found the documentation for changing chart styles and for changing series colors point-by-point, but I haven't found anything about choosing colors from the "Change colors" menu. I specifically want to change to a monochromatic color scheme, using the color choices provided by PowerPoint when doing so.
This is important because the documents I'm creating are going to people who do not understand how it's constructed on the back end—they just want to manipulate the data, so flexible color is best.
I'm guessing that this requires changing the XML directly?
With the first (blue) monochromatic style applied, these lines are added to the XML.
<p:extLst><p:ext uri="{D42A27DB-BD31-4B8C-83A1-F6EECF244321}"><p14:modId xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main" val="4058498100"/></p:ext></p:extLst>
But I'm not sure how to call these to edit them. I there documentation somewhere of this process?
Is it similar to editing table styles?
def table_formatting(table, shape, ic):
tbl = shape._element.graphic.graphicData.tbl
if ic == 'TABLE':
style_id = '{8EC20E35-A176-4012-BC5E-935CFFF8708E}'
else:
style_id = '{2D5ABB26-0587-4C30-8999-92F81FD0307C}'
tbl[0][-1].text = style_id
I found a better way to get the effect I needed automatically, using Python pptx's chart style option:
def createchart(chart_data, intendedchart):
graphic_frame = placeholder.insert_chart(v.charttypelist[intendedchart], chart_data)
chart = graphic_frame.chart
chart.chart_style = 3