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

Free Support Forum - aspose.com

How to Render Chart Area Correctly in .NET by Aspose.Cells


How to render chart area correctly in .NET by Aspose.Cells. When rendering a chart to images with Aspose.Cells, I noticed the chart area was rendered incorrectly.

Sample code:

var options = new ImageOrPrintOptions
                 ImageType = ImageType.Emf,
                 ChartImageType = ImageFormat.Emf,
                 OnlyArea = false,
                 TextRenderingHint = TextRenderingHint.ClearTypeGridFit,
                 OnePagePerSheet = true,
                 Transparent = true
             var workbook = new Workbook(@".\test.xlsx");
             workbook.Worksheets[0].Charts[0].ToImage(@".\out.emf", options);

I’ve attached the test files and a screenshot for you reference. Could you please help to take a look?

test.zip (28.0 KB)
image.png (59.6 KB)



Please try our latest version/fix: Aspose.Cells for .NET 21.10, it works fine with it as I tested.

Let us know if you still find any issue with latest version.

Hi @Amjad_Sahi

Thanks for your clarification. Indeed, I was using a version released earlier this year but now I no longer reproduce the issue with the latest version.

Thanks again


Good to know that the latest version fixes your issue. In the event to further queries or issue, feel free to write us back.