ChartAxisTitle class

ChartAxisTitle class

Provides access to the axis title properties. To learn more, visit the Working with Charts documentation article.

Properties

NameDescription
fontProvides access to the font formatting of the axis title.
formatProvides access to fill and line formatting of the axis title.
overlayDetermines whether other chart elements shall be allowed to overlap the title. The default value is False.
showDetermines whether the title shall be shown for the axis. The default value is False.
textGets or sets the text of the axis title. If None or empty value is specified, auto generated title will be shown.

Examples

Shows how to set chart axis title.

doc = aw.Document()
builder = aw.DocumentBuilder(doc=doc)
shape = builder.insert_chart(chart_type=aw.drawing.charts.ChartType.COLUMN, width=432, height=252)
chart = shape.chart
series_coll = chart.series
# Delete default generated series.
series_coll.clear()
series_coll.add(series_name='AW Series 1', categories=['AW Category 1', 'AW Category 2'], values=[1, 2])
chart_axis_x_title = chart.axis_x.title
chart_axis_x_title.text = 'Categories'
chart_axis_x_title.show = True
chart_axis_y_title = chart.axis_y.title
chart_axis_y_title.text = 'Values'
chart_axis_y_title.show = True
chart_axis_y_title.overlay = True
chart_axis_y_title.font.size = 12
chart_axis_y_title.font.color = aspose.pydrawing.Color.blue
doc.save(file_name=ARTIFACTS_DIR + 'Charts.ChartAxisTitle.docx')

See Also