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

Free Support Forum - aspose.com

Axis Labels Crowding

Hello,

I am generating a chart in Aspose that used to be generated using Excel. When made in Excel, the program automatically leaves out labels that would crowd the horizontal axis. However, Aspose does not replicate this behavior. I have attached examples of the chart to this post.

On a side note, I realize that there may be a way to fix this manually, but this chart is not always generated at the same size, so having a default label spacing or something similar will not work.

Thanks,

Matt

Hi Matt,

I think you may try to specify some properties of axis labels and set the rotation angle for your category axis labels if it works fine for you.

e.g..,

//Set properties of categoryaxis labels.
//chart.CategoryAxis.TickLabels.AutoScaleFont = true;
chart.CategoryAxis.TickLabels.Rotation = 45;
chart.CategoryAxis.TickLabels.Font.Size = 9;

Thank you.