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

Free Support Forum - aspose.com

Chart Axis Labels Positions


I am using aspose.slide version 7.1 to create a .pptx presentation in which I need to add a simple “Clustered Column” chart. In my data I have some negative values. Their corresponding columns are drawn bellow the category axis. This result in an overlapping between the columns and the Category Axis labels as show the attached screenshot “Category Axis Overlapping.png”. Is there any way to change the “Axis Labels” value to “Low” as show the attached screenshot “Category Axis Low.png”. If so could you please share with me a code snippet that allows me to set the "Axis Labels"

Thank you in advance
Sami Simon

Hi Sami Simon,

I have observed the requirement shared by you. Please use the following sample code to serve the purpose on your end. Please share, if I may help you further in this regard.

public static void testAxisLabelPosition()
PresentationEx pres = new PresentationEx(“D:\Aspose Data\NegativeChart.pptx”);
SlideEx slide = pres.Slides[0];

ChartEx chart = (ChartEx)slide.Shapes[0];

chart.CategoryAxis.TickLabelPosition = TickLabelPositionType.Low; ;

pres.Write(“D:\Aspose Data\NegativeChart_Modified.pptx”);

Many Thanks,