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

Free Support Forum - aspose.com

How to reduce the font size of catogory data in charts


I'm generation column charts. I have to generate the chart in a very small area. so when the chart is displayed, not all the category data on the X-axis s displayed. For eg: I have 12 items that are supposed to be displayed on the X-axis, but due to area restriction only 5 are displayed. so I thought reducing the font size of these elements will help. Can you please suggest how to reduce the font size or any other alternate way to make all the elements appear.



Thanks for considering Aspose.

For reducing font size you may use TickLabels.Font.Size property. E.g.,

chart.CategoryAxis.TickLabels.Font.Size =7;

And I think you may try to utilize some other properties to show all the category axis labels


chart.CategoryAxis.TickLabels.AutoScaleFont = true;
chart.CategoryAxis.TickLabels.Rotation = 40;

Thank you.