From pptx import Presentation
From Pptx.util import Inches
From Pptx.enum.text import mso_auto_size
From Pptx.enum.chart import Xl_tick_mark
From Pptx.util import Pt
From Pptx.chart.data import ChartData
From pptx.enum.shapes import Mso_auto_shape_type,mso_connector_type
From Pptx.dml.color import RGBColor
From Pptx.enum.chart import xl_data_label_position
From Pptx.enum.chart import xl_legend_position
From Pptx.enum.chart import Xl_chart_type
From Pptx.enum.chart import Xl_marker_style
From Pptx.enum.chart import xl_tick_label_position
PRS = Presentation (' 2017 North section of the first stage of satisfaction survey report v.7.0 reporting. pptx ')
SLIDE=PRS.SLIDES[10]
For shape in Slide.shapes:
If not shape.has_chart:
Continue
Else
Chart = Shape.chart
Chart_data = ChartData ()
chart_data.categories = [' Group 1 ', ' ', ' Group 2 ', ' Group 3 ', ' Group 4 ', ' Group 5 ',]
Chart_data.add_series (' Industry comparison ', (19, ', 20,22,25,30))
Chart_data.add_series (' Industry comparison ', (29, ', 35,26,37,20))
Chart_data.add_series (' Industry comparison ', (30, ', 18,40,15,41))
Chart.replace_data (Chart_data)
Prs.save (' test.pptx ')
Python--pptx--The same sequence of multiple data