I have a chart with slanted CategoryAxis TickLabels (-45 degree rotation angle) that I’m converting to an image file with Aspose.Cells. A few of the labels were too long and Aspose cut off the end of these long labels by ending the label text with 3 periods “…”.
I’ve found out that I can get around this problem by increasing the chart height (chart.ChartObject.Height) but I was wondering if there is a chart property that I could set that would cause Aspose to automatically adjust the chart height so that the label text would not get cut off when converting a chart to an image file? Below is the C# code I’m using:
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
imgOptions.ImageFormat = System.Drawing.Imaging.ImageFormat.Png;
imgOptions.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
worksheet = workbook.Worksheets[2];
Aspose.Cells.Charts.Chart chart = worksheet.Charts[0];
chart.ToImage(“test.png”, imgOptions);