axes property

Chart.axes property

Gets a collection of all axes of this chart.

@property
def axes(self) -> aspose.words.drawing.charts.ChartAxisCollection:
    ...

Examples

Shows how to work with axes collection.

doc = aw.Document()
builder = aw.DocumentBuilder(doc)

shape = builder.insert_chart(awdc.ChartType.COLUMN, 500, 300)
chart = shape.chart

# Hide the major grid lines on the primary and secondary Y axes.
for axis in chart.axes:
    if axis.type == awdc.ChartAxisType.VALUE:
        axis.has_major_gridlines = False

doc.save(ARTIFACTS_DIR + "Charts.AxisCollection.docx")

See Also