We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to remove or hide chart axis line (C# .NET)

In a chart, I need to remove/hide the axis line on the horizontal axis. In PowerPoint, this can be done through the Format Axis/Line/select “No Line” . But how do I control this property in the Aspose.Slides .Net API? See attached image that illustrates what I want to achieve.

image.png (37.2 KB)


I have observed the requirements shared by you and suggest you to please try using following sample code on your end.

		chart.Axes.HorizontalAxis.MajorGridLinesFormat.Line.FillFormat.FillType = FillType.NoFill;
		chart.Axes.HorizontalAxis.MinorGridLinesFormat.Line.FillFormat.FillType = FillType.NoFill;
		chart.Axes.HorizontalAxis.MajorGridLinesFormat.Line.Width = 0;
		chart.Axes.HorizontalAxis.MinorGridLinesFormat.Line.Width = 0;