chart.ToImage result is different than the chart

Hello,


I’ve attached a xlsx document that contains a chart(source) and an image(result of chart.ToImage). The code sequence is the following:

var xlsDoc = new Workbook(“C:\doc.xlsx”);
var chart = xlsDoc.Worksheets[0].Charts[0];

var img = chart.ToImage(new ImageOrPrintOptions
{
Quality = 100,
VerticalResolution = 200,
HorizontalResolution = 200,
PrintingPage = PrintingPageType.IgnoreBlank,
ImageFormat = ImageFormat.Jpeg,
OnePagePerSheet = true,
OnlyArea = true,
ChartImageType = ImageFormat.Bmp
});

img.Save(“C:\img.jpg”,ImageFormat.Jpeg);

You can see that the resulting image is different from the original chart: the x axis from the image doesn’t contain the same values as the x axis from the chart. I’m getting the same result when saving the image as Png.

Thank you,
George Radu
Software Developer
IBM Romania


Hi,

Thanks for your posting and using Aspose.Cells.

We were able to observe this issue after executing your sample code with your source excel file using the latest version: Aspose.Cells
for .NET v8.5.0.1
.

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-43756 - X axis from the aspose chart image doesn’t contain the same values as the x axis from the excel chart

Hi,

Thanks for your using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for .NET v8.5.0.2 and let us know your feedback.

Hello,


Can you please give me the link for .Net Framework 3.5?

Thank you,
George Radu
Software Developer
IBM Romania

Hi,


Well, generally we provide .NET framework 2.0 compiled version of the fix into the forums, this version works fine on any .NET framework version >= 2.0 (e.g 2.0, 3.0, 3.5, 4.0, 4.5 etc.).

Anyways, if you still need the specific version, we will check and provide you here soon.

Thank you.

Hello,


I will need that specific version, please.

Thank you,
George Radu
Sofware Developer
IBM Romania

Hi,


Please find attached the .NET framework 3.5 compiled version of the fix for your needs.

Let us know if you still have any issue.

Thank you.

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


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