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

Free Support Forum - aspose.com

Column chart overlap issue in PDF

Hi,


I am using Aspose.Cells for our web application. When I export the workbook to pdf, the column chart overhangs through the category axis as you can see on the attached image.

The version I’ve tested is Aspose.Cells 7.0.3.6 and here is the sample code for this issue:

Workbook workbook = new Workbook(FileFormatType.Xlsx);
Worksheet sheet = workbook.Worksheets[0];
Cells cells = workbook.Worksheets[0].Cells;

cells[“A1”].PutValue(“Region”);
cells[“A2”].PutValue(“France”);
cells[“A3”].PutValue(“Germany”);
cells[“A4”].PutValue(“England”);
cells[“A5”].PutValue(“Sweden”);
cells[“A6”].PutValue(“Italy”);
cells[“A7”].PutValue(“Spain”);
cells[“A8”].PutValue(“Portugal”);
cells[“B1”].PutValue(“Sale”);
cells[“B2”].PutValue(70000);
cells[“B3”].PutValue(55000);
cells[“B4”].PutValue(30000);
cells[“B5”].PutValue(40000);
cells[“B6”].PutValue(35000);
cells[“B7”].PutValue(32000);
cells[“B8”].PutValue(10000);

int chartIndex = sheet.Charts.Add(ChartType.Column, 11, 0, 34, 8);
Chart chart = sheet.Charts[chartIndex];

chart.NSeries.Add(“B2:B8”, true);
chart.NSeries.CategoryData = “A2:A8”;
chart.NSeries.IsColorVaried = true;

const string path = “D:\test.pdf”;
workbook.Save(path);

Thank you.

Hi,

Thanks for your code example, I was able to see the problem.

I have attached the output xlsx and pdf generated by your code for a reference.

We have logged this issue in our database. We will look into it and fix it asap.

This issue has been logged as CELLSNET-40182.

Hi,

We have fixed this issue. Please download: Aspose.Cells for .NET v7.0.4.2