I don't know how to change the tick label text of category axis. I want to extract these texts and insert with another. So, if someone help me how can I do with this case, please!
from pptx.enum.chart import XL_CHART_TYPE
from pptx import Presentation
proj1 = Presentation("C:/Users/naych/Documents/chart.pptx")
for slide in proj1.slides:
for shape in slide.shapes:
if shape.has_chart:
chart=shape.chart
if chart.chart_title.has_text_frame:
print(chart.chart_title.text_frame.text)
category_axis=chart.category_axis
category_axis.tick_labels.font.italic=True
proj1.save('new_chart_lang.pptx')
and I got this output. Snow falling
In my slide, there are only one bar chart. There are one chart title, 'Snow falling' and four category axis labels. I wanna to get these category axis labels. I hope someone can help me