chart.ToImage() modifies label's alignment

Hello,

If we save the chart in our attached workbook as image, the horizontal axis labels are printed all on one line, instead of two. Thus, they overlap. Secondly, the DD/MM/YYYY date labels change their position a bit.

Here is the following code used to reproduce this issue:
-------------------
var workbook = new Workbook(“testFile.xlsx”);
var worksheet = workbook.Worksheets[0];
const string chartName = “Chart 6”;

var chart =
worksheet.Charts.FirstOrDefault(x => chartName.Equals(x.Name, StringComparison.OrdinalIgnoreCase));
if (chart == null)
return;

chart.ToImage().Save(“out.png”);
-------------------

Compare the output with the original chart.

InternalId: 33497

Best regards,
Jean-Alexandru Stanescu
Junior Developer
IBM Romania

Hi,

Thanks for your posting, illustrating nice screenshot and using Aspose.Cells.

We were able to replicate this issue by converting your excel file into pdf and observing the chart image inside it using the latest version: Aspose.Cells
for .NET v8.6.1.2
as per your screenshot.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSNET-44046 - Chart.ToImage modifies labels alignment

I have attached the output pdf generated with the following code for a reference.

C#
string filePath=“D:\Downloads\testFile.xlsx”;

Workbook workbook = new Workbook(filePath);

PdfSaveOptions opts = new PdfSaveOptions();
opts.OnePagePerSheet = true;

workbook.Save(filePath + “.out.pdf”, opts);

Hi,


Please try our latest version/fix: Aspose.Cells for .NET v8.6.2.5

We have fixed your issues i.e., “CELLSNET-44046” now.

Let us know your feedback.

Thank you

The issues you have found earlier (filed as CELLSNET-44046) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan