各位好,不好意思又遇到问题上网找不到答案,再麻烦帮忙。谢谢大家
问题:
建立长条图后想要修改图表标题字体大小跟图表X轴标签字体大小,我的程式码如下。谢谢
chart =arChart()
chart.type "col"
chart.style 10
chart.title "CP W1_CLIP"
chart.gapWidth 500
chart.legend Legend()
chart.legend.position 'b'
chart.legend.layout None
chart.legend.overlay False
data = Reference(ws_new,in_col=2,in_row=1,ax_col=len(weeks)+1,ax_row=len(vend_names)+1)
cats = Reference(ws_new,in_col=1,in_row=2,ax_row=len(vend_names)+1)
chart.add_data(data,itles_from_data=True)
chart.set_categories(cats)
ws_new.add_chart(chart, "I2")
target_value 0.8
target_data [target_value] *en(vend_names)
target_ref Reference(ws_new,in_col=len(weeks) + 2,in_row=1,ax_row=len(vend_names) + 1)
for, value in enumerate(target_data, start=2):
ws_new.cell(row=i, column=len(weeks) + 2, value=value)
line_chartineChart()
line_chart.add_data(target_ref,itles_from_data=True)
line_chart.set_categories(cats)
for series inine_chart.series:
series.graphicalProperties.line.solidFill "FF0000"
series.graphicalProperties.line.width 9525 * 2
chart +=ine_chart
chart.width 36