创建聚集的条形图后,我想创建或插入一个中位数。
chart_data = CategoryChartData()
chart_data.categories = ['2016', 'TTM']
chart_data.add_series('Chart 1', (1.4, 3.2))
# add chart to slide --------------------
x, y, cx, cy = Inches(2), Inches(2), Inches(6), Inches(4.5)
slide1.shapes.add_chart(
XL_CHART_TYPE.COLUMN_CLUSTERED, x, y, cx, cy, chart_data
)