Change Axis Options of Chart | Code to Show Hide Chart Axis in Word Document using C# .NET or Java | Chart Axis Visibility

how can i change the following options of char?

图片.png (45.7 KB)

@qingyuan.ni,

Thanks for your inquiry. Unfortunately, Aspose.Words does not support the requested feature at the moment. However, we have logged this feature request as WORDSNET-15801 in our issue tracking system. You will be notified via this forum thread once this feature is available.

We apologize for your inconvenience.

@qingyuan.ni,
The issues you have found earlier (filed as WORDSNET-15801) have been fixed in this Aspose.Words for .NET 18.1 update and this Aspose.Words for Java 18.1 update.
Please also check the following articles:

@qingyuan.ni,

Regarding WORDSNET-15801, to reveal visibility state of an Axis of a Chart in Word document, we had added the ChartAxis.Hidden property in Aspose.Words for .NET and Aspose.Words for Java APIs starting from the 18.1 versions. This can be used to get or set a flag indicating whether this axis is hidden or not. For example, please check the following C# code to create a Chart and hide its Y-Axis.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

// Insert chart.
Shape shape = builder.InsertChart(ChartType.Column, 432, 252);
Chart chart = shape.Chart;

// Clear demo data.
chart.Series.Clear();

// Fill data.
chart.Series.Add("AW Series 1",
    new string[] { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" },
    new double[] { 1.2, 0.3, 2.1, 2.9, 4.2 });

// Hide the Y axis.
chart.AxisY.Hidden = true;
doc.Save("C:\\temp\\20.9.docx");